Ко всем New
Code
new popu[MAX_PLAYERS];
В public OnPlayerCommandText();
Code
else if(strcmp(cmd, "/popug", true) == 0)
{
tmp = strtok(cmdtext,idx);
giveplayerid = ReturnUser(tmp);
if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] > 1) return SendClientMessage(playerid,COLOR_WHITE,"{F74848}»Введите:{FFFFFF} /popug [id]");
giveplayerid = ReturnUser(tmp);
if(popu[giveplayerid] == 0)
{
SetPlayerAttachedObject(giveplayerid, 7, 19078, 1, 0.329150, -0.072101, 0.156082, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
SendClientMessage(giveplayerid,COLOR_WHITE,"{F74848}Попугай на плече");
popu[giveplayerid] = 1;
}
else
{
RemovePlayerAttachedObject(giveplayerid, 7);
DestroyPlayerObject(giveplayerid, 19078);
SendClientMessage(giveplayerid,COLOR_WHITE,"{F74848}Попугай убран.");
}
return 1;
}