07.09.2014, 05:37
(
Последний раз редактировалось AroseKhanNiazi; 07.09.2014 в 10:47.
)
i am using it as an command for testing how the system works 
edit: sorry i missed to add [] in params it took me like 10 hours to figure it out :/
ok i want to ask how to set CELLMIN_ON_MATCHES globally
edit 2:
so i worked on script set the cellmin globally
so this won't work command won't get executed and nothing in print
full command i will work on it its just testing now

edit: sorry i missed to add [] in params it took me like 10 hours to figure it out :/

edit 2:
so i worked on script set the cellmin globally
pawn Код:
if (TargetID == cellmin)
{
foreach(Player,i) if(!strcmp(PlayerInfo[TargetID][pUserName],PlayerInfo[i][pUserName])){ TargetID=i; print("case 1");}
else { print("case 2"); SendClientMessage(playerid,COLOR_ERROR,ERROR_MULTIPLE_MATCHES); }
}
full command i will work on it its just testing now
pawn Код:
CMD:i(playerid,params[])
{
new TargetID;
if(!sscanf(params, "u", TargetID))
{
//if(TargetID == -1) return SendClientMessage(playerid,COLOR_ERROR,"Please Enter An Value");
if (TargetID == cellmin)
{
foreach(Player,i) if(!strcmp(PlayerInfo[TargetID][pUserName],PlayerInfo[i][pUserName])){ TargetID=i; print("case 1");}
else { print("case 2"); SendClientMessage(playerid,COLOR_ERROR,ERROR_MULTIPLE_MATCHES); }
}
else if (TargetID == INVALID_PLAYER_ID)
{
SendClientMessage(playerid,COLOR_ERROR,ERROR_INVALID_PLAYER);
}
else
{
new string[50];
format(string,sizeof(string),"%d is the id of player.",TargetID);
SendClientMessage(playerid,-1,string);
}
}else print("empty");
return 1;
}