04.01.2010, 17:26
Hey, I've made this:
It gives this error:
error 029: invalid expression, assumed zero
on the marked line...
How to solve?
And also, how to put the locate into a timer which updates the marker every second?
pawn Код:
dcmd_locatephone(playerid,params[])
{
if(PlayerInfo[playerid][pFaction] != 1337) return 1;
new number;
if(sscanf(params,"d",number)) return SendClientMessage(playerid,COLOR_GREY,".: Usage: /locatephone [number] :.");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pNumber] == number)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i,X,Y,Z);
SetPlayerCheckpoint(playerid,X,Y,Z,5.0);
SendClientMessage(playerid,COLOR_GREENLIGHT,".: Info: The Phone has been located :.");
return 1;
}
}
else SendClientMessage(playerid,COLOR_DARKRED,".: Info: Phone doesn't establish a connection :."); //<-----------THIS LINE
return 1;
}
error 029: invalid expression, assumed zero
on the marked line...
How to solve?
And also, how to put the locate into a timer which updates the marker every second?