28.02.2010, 19:45
Quote:
Originally Posted by dice7
try strval instead of sscanf
|
-------------------------------------
Код:
if(!(dini_Int(str, "AdminLevel") >= 1))
-------------------------------------
pawn Код:
dcmd_goto(playerid,params[])
{
if(IsPlayerAdmin(playerid)) //your valid check
{
if(sscanf(params,"u",params[0])) SendClientMessage(playerid, COLOR_RED, "USAGE: /goto [playerid]");
else if(params[0] == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Invalid Player ID.");
else
{
new Float:pos[3],pname[MAX_PLAYER_NAME],string[128]; GetPlayerPos(params[0],pos[0],pos[1],pos[2]); SetPlayerPos(playerid,pos[0]+2,pos[1]+2,pos[2]);
GetPlayerName(playerid,pname,sizeof(pname); format(string,sizeof(string),"%s has teleported to you",pname); SendClientMessage(params[0],COLOR_RED,string);
GetPlayerName(params[0],pname,sizeof(pname); format(string,sizeof(string),"You have teleported to %s",pname); SendClientMessage(playerid,COLOR_RED,string);
}
}
else SendClientMessage(playerid, COLOR_RED, "Admins Only!");
return 1;
}