PDA

View Full Version : little help


Gafsi
07/12/2013, 01:16 AM
hello i have this command and evrything is fine

CMD:get(playerid,params[])
{
new pID, Float:pX, Float:pY, Float:pZ, pIDvehicle;
if(!IsPlayerAdmin(playerid)) return MSG(playerid,RED,"UnKnown Command! Type /help");
if(sscanf(params, "u", pID)) return MSG(playerid,RED,"Get a player: /get <playerid>");
if(!IsPlayerConnected(pID))return MSG(playerid,RED,"Player is not connected");
if(GetPlayerState(pID) == PLAYER_STATE_DRIVER)
{
pIDvehicle = GetPlayerVehicleID(pID);
SetVehiclePos(pIDvehicle, pX, pY+1, pZ);
}
if(pID == playerid) return MSG(playerid, RED, " ");
GetPlayerPos(playerid, pX, pY, pZ);
SetPlayerPos(pID, pX, pY+1, pZ);
return 1;

}

and i want if the pID was playerid the cmd dont work and without send to the playerid any message i do this but i ask if there other way to do that

if(pID == playerid) return MSG(playerid, RED, " ");

Hansrutger
07/12/2013, 01:49 AM
If you teleport yourself to your position, then I don't think it will do anything as you will teleport yourself to your own coordinates, right?