14.04.2012, 19:16
How can I make this not slap the player who is ID 0.
I want it to slap the player that is doing the C-bugging and not ID 0.
I want it to slap the player that is doing the C-bugging and not ID 0.
pawn Код:
forward OnPlayerCBug(playerid);
public OnPlayerCBug(playerid) {
new playername[MAX_PLAYER_NAME];
new player1;
GetPlayerName(playerid, playername, sizeof(playername));
new str2[128];
new givenid;
format(str2, sizeof(str2), "Automatic system has slapped %s for Crouch bugging with weapon (%s!)", playername, aWeaponNames[WeaponID[playerid]]);
new Float:Health; GetPlayerHealth(player1,Health); SetPlayerHealth(player1,Health-10);
new Float:x, Float:y, Float:z;
GetPlayerPos(givenid, x, y, z);
SetPlayerPos(givenid, x, y, z+5);
PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(player1,1190,0.0,0.0,0.0);
SendClientMessageToAll(COLOR_RED, str2);
CheckCrouch[playerid] = 0;
return 1;
}