Raised This Month: $140 Target: $400
 35% 

What is a problem?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Enes05
New Member
Join Date: Feb 2018
Location: Istanbul | Turkey
Old 08-12-2018 , 21:48   What is a problem?
Reply With Quote #1

Hello everyone

Firstly im sorry for my bad english
I ran into a problem.
This plugin is not working.
can someone solve it?

This plugin: (In round start strip all weapons and gives awp and deagle all players)

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <multicolors>
#pragma tabsize 0

public OnPluginStart()
{
HookEvent("round_start", RoundStart);
}

public Action:RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
ServerCommand("sm_strip @all 1 2 3 4 5 6");
ServerCommand("sm_give @all awp");
ServerCommand("sm_give @all deagle");
CPrintToChatAll("{darkred} AWP {orange}and {darkred} DEAGLE {orange}gived to all players);
}


What's the matter?

Last edited by Enes05; 08-12-2018 at 21:49.
Enes05 is offline
Crasher_3637
AlliedModders Donor
Join Date: May 2012
Old 08-12-2018 , 21:55   Re: What is a problem?
Reply With Quote #2

You're missing a quotation mark.

Before:

PHP Code:
CPrintToChatAll("{darkred} AWP {orange}and {darkred} DEAGLE {orange}gived to all players); 
After:

PHP Code:
CPrintToChatAll("{darkred} AWP {orange}and {darkred} DEAGLE {orange}gived to all players"); 
__________________
AFK like JFK
Crasher_3637 is offline
Enes05
New Member
Join Date: Feb 2018
Location: Istanbul | Turkey
Old 08-12-2018 , 22:00   Re: What is a problem?
Reply With Quote #3

I've fixed it but it's still not working
(they did not make an error when they compiled)

Last edited by Enes05; 08-12-2018 at 22:01.
Enes05 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Location: Not your business.
Old 08-12-2018 , 22:13   Re: What is a problem?
Reply With Quote #4

”Deagle” and ”Awp” aren’t valid entities.

Also you don’t want to youse servercommands when there are already functions. Use GivePlayerItem instead.
__________________
Taking requests, add me on Steam.

mug1wara.xyz

Never call me a weeb.
mug1wara is offline
Enes05
New Member
Join Date: Feb 2018
Location: Istanbul | Turkey
Old 08-12-2018 , 22:24   Re: What is a problem?
Reply With Quote #5

ServerCommand("sm_strip @all 1 2 3 4 5 6");
GivePlayerItem("weapon_awp");
GivePlayerItem("weapon_deagle");

this a true?

im new to sourcepawn coding, im sorry
Enes05 is offline
Crasher_3637
AlliedModders Donor
Join Date: May 2012
Old 08-12-2018 , 22:27   Re: What is a problem?
Reply With Quote #6

Quote:
Originally Posted by Enes05 View Post
ServerCommand("sm_strip @all 1 2 3 4 5 6");
GivePlayerItem("weapon_awp");
GivePlayerItem("weapon_deagle");

this a true?

im new to sourcepawn coding, im sorry
PHP Code:
for (int i 1<= MaxClientsi++)
{
    if (
IsClientInGame(i) && IsPlayerAlive(i))
    {
        
GivePlayerItem(i"weapon_awp");
        
GivePlayerItem(i"weapon_deagle");
    }

__________________
AFK like JFK
Crasher_3637 is offline
Enes05
New Member
Join Date: Feb 2018
Location: Istanbul | Turkey
Old 08-12-2018 , 22:51   Re: What is a problem?
Reply With Quote #7

can someone do it and throw the source code? it still not working
Enes05 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:07.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode