Someone help meh pl0x -
Noddi3 - 28.10.2009
Hey i have this code : if(GetPlayerWeapon(playerid) == WEAPON_M4) {
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,0xAA3333AA,"you don't realy need gun's on a drift server..");
return 0;
}
What would i have to do to it so it's admin's only that can use this weapon?
Thank's
-Noddi3
Re: Someone help meh pl0x -
Correlli - 28.10.2009
pawn Код:
if((GetPlayerWeapon(playerid) == WEAPON_M4) && (!IsPlayerAdmin(playerid)))
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xAA3333AA, "you don't realy need gun's on a drift server..");
return 0;
}
Re: Someone help meh pl0x -
Tigerbeast11 - 28.10.2009
You will have to set a timer...
just use
if(GetPlayerWeapon(playerid) == WEAPON_M4)
{
if(IsPlayerAdmin(playerid))
{
//something
}
else
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid,0xAA3333AA,"you don't realy need gun's on a drift server..");
return 0;
}
Plz note that i typed this up right now, so it isnt tested =P
Re: Someone help meh pl0x -
Djiango - 28.10.2009
pawn Код:
if(GetPlayerWeapon(playerid) == WEAPON_M4 && !IsPlayerAdmin(playerid))
Re: Someone help meh pl0x -
Tigerbeast11 - 28.10.2009
Quote:
|
Originally Posted by |∞|-Рцппσĵσ-|∞|
pawn Код:
if(GetPlayerWeapon(playerid) == WEAPON_M4 && !IsPlayerAdmin(playerid))
|
Missing Bracket!!!!!
Код:
if(GetPlayerWeapon(playerid) == WEAPON_M4 && (!IsPlayerAdmin(playerid)))
Re: Someone help meh pl0x -
Correlli - 28.10.2009
Quote:
|
Originally Posted by Tigerbeast11
Quote:
|
Originally Posted by |∞|-Рцппσĵσ-|∞|
pawn Код:
if(GetPlayerWeapon(playerid) == WEAPON_M4 && !IsPlayerAdmin(playerid))
|
Missing Bracket!!!!!
|
He's not missing anything.
Re: Someone help meh pl0x -
Tigerbeast11 - 28.10.2009
If hes not missing anything, then u've got an extra bracket, cuz his and urs dont match
Re: Someone help meh pl0x -
Correlli - 28.10.2009
Quote:
|
Originally Posted by Tigerbeast11
If hes not missing anything, then u've got an extra bracket, cuz his and urs dont match
|
No, i don't have an extra bracket - check my and his code again and maybe you'll learn something.
Re: Someone help meh pl0x -
Tigerbeast11 - 28.10.2009
Don Corelli's Code
Код:
if((GetPlayerWeapon(playerid) == WEAPON_M4) && (!IsPlayerAdmin(playerid)))
|∞|-Рцппσĵσ-|∞|'s Code
Код:
if(GetPlayerWeapon(playerid) == WEAPON_M4 && !IsPlayerAdmin(playerid))
Now you tell me the difference!
Re: Someone help meh pl0x -
Correlli - 28.10.2009
There's no difference - except in some extra brackets but NOT missed brackets like you thought.