28.02.2010, 18:39
So my code is working only on Playerid 0 :@
I have searched out whole code but i didnt found the problem..
I have searched out whole code but i didnt found the problem..
Код:
dcmd_goto(playerid,params[]) { new pName[24], str[128]; GetPlayerName(playerid, pName, sizeof(pName)); format(str, sizeof(str),PlayerFile,pName); if(!(dini_Int(str, "AdminLevel") >= 1)) { SendClientMessage(playerid, COLOR_RED, "Admins Only!"); return 1; } new player, name[24]; if(sscanf(params,"u",player)) { SendClientMessage(playerid, COLOR_RED, "USAGE: /goto [playerid]"); return 1; } if(!IsPlayerConnected(player)) { SendClientMessage(playerid, COLOR_RED, "Invalid Player ID."); return 1; } if(dini_Int(str, "AdminLevel") >= 1) { new Float:X,Float:Y,Float:Z,pint,name2[24],string[40],string2[39]; GetPlayerName(player,name2,sizeof(name2)); GetPlayerPos(player,X,Y,Z); GetVehiclePos(player,X,Y,Z); pint = GetPlayerInterior(player); SetPlayerPos(playerid,X+1,Y,Z); SetPlayerInterior(playerid,pint); format(string,sizeof(string),"You have teleported to %s",name2); format(string2,sizeof(string2),"%s has teleported to you",name); SendClientMessage(playerid,COLOR_RED,string); SendClientMessage(player,COLOR_RED,string2); } return 1; }