12.07.2013, 01:50
Try declaring the variable forsaleznak as a player variable
pawn Код:
new forsaleznak[MAX_PLAYERS];
//then in the command
if(strcmp(cmd, "/srediznakce", true) == 0)
{
if(xkukja2[playerid] != 0)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
forsaleznak[playerid] = CreateObject(19471, x, y, z+2, 0.0, 0.0, 0.0);
EditObject(playerid, forsaleznak);
}
else
{
SendClientMessage(playerid, WHITE, "{F20000}GRESKA: {FFFFFF}Koristete prvo /kreirajkukja !");
}
}
//do the same with onplayereditobject