03.11.2010, 18:38
Quote:
sscanf: use this. It will be pretty simple to use. Please note you need the plugin or the code to use :P
Example: pawn Код:
|
pawn Код:
dcmd_egoto(playerid,params[])
{
new string[100], pName[25], pName2[25];
if(!strlen(params)) return SendClientMessage(playerid,red,"USSAGE: /goto [id]");
else if(enablegoto[id] == 0) return SendClientMessage(playerid,red,"ERROR: That player has goto disabled");
else if(!IsPlayerConnected(strval(params))) return SendClientMessage(playerid,red,"Player not connected");
else
{
GetPlayerPos(strval(params),X,Y,Z);
SetPlayerPos(playerid,X,Y,Z);
GetPlayerName(strval(params),pName2,25);
GetPlayerName(playerid,25);
format(string,100,"||Teleported to %s||",pName2);
SendClientMessage(playerid,grey,string);
format(string,100,"||%s has teleported to your position||",pName);
SendClientMessage(strval(params),grey,string);
}
return 1;
}