16.06.2014, 23:38
Try as well
pawn Код:
CMD:infect(playerid,params[])
{
if(gTeam[playerid] == TEAM_ZOMBIES){
new Float:MyPos[3], string[128], pName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME];
if(sscanf(params,"u",params[0])) return xSCM"{FFA500}*{EEEEEE}Usage:/infect [playerid]");
if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid, -1, "ID No coneected!");
GetPlayerPos(params[0], MyPos[0], MyPos[1], MyPos[2]);
if(IsPlayerInRangeOfPoint(playerid, 4.0, MyPos[0], MyPos[1], MyPos[2]) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(params[0]))
{
GetPlayerName(playerid,pName,sizeof(pName)), GetPlayerName(params[0],tName,sizeof(tName));
format(string,sizeof(string),"{FFA500}*%s has infected %s and now he's a zombie",pName,tName);
SendClientMessageToAll(COLOR_WHITE,string);
gTeam[params[0]] = TEAM_ZOMBIES;
SetPlayerColor(params[0],COLOR_ORANGE);
SetPlayerPos(params[0],-273.5326,1152.8778,20.7803);
SetPlayerHealth(params[0],100.0);
} else SendClientMessage(playerid, -1, "you not this near of the player");
} else SendClientMessage(playerid, -1, "{FFA500}*{EEEEEE}You're not a zombie!");
return 1;
}