13.10.2009, 11:26
Quote:
Originally Posted by virspector
Maybe like this:
pawn Код:
|
[pawn]
if(strcmp(cmd, "/goto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /gps [playerid/PartOfName]");
return 1;
}
new Float:idx,Float:idy,Float:idz;
new id;
id = ReturnUser(tmp);
if (IsPlayerConnected(id))
{
if(plo != INVALID_PLAYER_ID)
{
GetPlayerPos(plo, plocx, plocy, plocz);
SetPlayerCheckpoint(playerid, idx, idy, idz);
}
}
else
{
format(string, sizeof(string), " %d is not an active player.", id);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
return 1;
}
I'm not totally sure this is gonna work i extracted some bits from my gm and put some junk in ;p