Class command
#1

I did create a /swatweaps so people in the S.W.A.T class do get weapons.
But when I tried the command in another class they get the weapons to?

pawn Код:
CMD:swatweaps(playerid, params[])
{
    if(GetPlayerTeam(playerid) == TEAM_SWAT)
    GivePlayerWeapon(playerid, 3, 1);
    GivePlayerWeapon(playerid, 22, 1000);
    GivePlayerWeapon(playerid, 31, 2500);
    GivePlayerWeapon(playerid, 29, 1500);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "You do now have S.W.A.T Weapons");
    return 1;
}
Reply
#2

Anybody correct me if i am wrong but i swear it is meant to be like:
Код:
CMD:swatweaps(playerid, params[])
{
    if(GetPlayerTeam(playerid) == TEAM_SWAT)
    {
         GivePlayerWeapon(playerid, 3, 1);
         GivePlayerWeapon(playerid, 22, 1000);
         GivePlayerWeapon(playerid, 31, 2500);
         GivePlayerWeapon(playerid, 29, 1500);
         SendClientMessage(playerid, COLOR_LIGHTBLUE, "You do now have S.W.A.T Weapons");
    }
    return 1;
}
try it.
Reply
#3

pawn Код:
if(GetPlayerTeam(playerid) != TEAM_SWAT)
    return SendClientMessage(playerid, -1, "You're not swat");
Reply
#4

Thanks both of you.
Reply
#5

No problem, I'm bored -_-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)