10.09.2014, 17:48
Oh my god.
1) Use [ pawn ] tags.
2) Use zcmd and sscanf
3) Why 128 for "On"? Why?
4) Why 128 for "Off"
?
1) Use [ pawn ] tags.
2) Use zcmd and sscanf
3) Why 128 for "On"? Why?
4) Why 128 for "Off"
![Huh?](images/smilies/confused.gif)
pawn Код:
new bool: gotoState[ MAX_PLAYERS ] = {false, ...};
CMD:goto(playerid, params[])
{
new target;
if(!sscanf(params, "u", target)) {
if(gotoState[target]) {
new Float: x, Float: y, Float: z;
GetPlayerPos(target, x, y, z);
SetPlayerPos(playerid, x, y, z);
}
else return SendClientMessage(playerid,COLOR_RED,"Il giocatore ha disattivato il goton");
}
else return SendClientMessage(playerid, COLOR_RED, "USAGE: /goto [playerid]");
return 1;
}
CMD:mygoto(playerid, params[])
{
gotoState[playerid] = !gotoState[playerid];
return 1;
}