09.03.2013, 20:12
Well, here is my code:
The problem is that when I write /goto [anynumberhere] i just get the message "error: the player is not connected"
Even if the id of the player online is valid.
Yes, I have written next to plugins "sscanf" in server.cfg
Yes, I have the zcmd and sscanf2 includes in pawno/include folder.
Please help!
Код:
#include <a_samp> #include <sscanf2> #include <zcmd> CMD:goto(playerid, params[]) { new target; if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /goto [ID]"); new Float:tX,Float:tY,Float:tZ; new vehicleid = GetPlayerVehicleID(playerid); GetPlayerPos(targetid,tX,tY,tZ); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected"); if (vehicleid == 0) { SetPlayerPos(playerid,tX+1,tY+1,tZ); } else { SetVehiclePos(vehicleid,tX+2,tY+2,tZ); PutPlayerInVehicle(playerid,vehicleid,0); } return 1; }
Even if the id of the player online is valid.
Yes, I have written next to plugins "sscanf" in server.cfg
Yes, I have the zcmd and sscanf2 includes in pawno/include folder.
Please help!