symbol is never used: "pID"[++rep] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: symbol is never used: "pID"[++rep] (
/showthread.php?tid=585300)
symbol is never used: "pID"[++rep] -
simo0000 - 12.08.2015
hello guys i need help alot of commands i get same problem
pawn Код:
CMD:gotoid(playerid, params[])
{
new pID, Float: X, Float: Y, Float: Z;
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
if(sscanf(params, "u", pID))
return SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /gotoid [playerid/name]");
if(IsPlayerConnected(pID))
{
GetPlayerPos(pID, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);
SetPlayerInterior(playerid, GetPlayerInterior(pID));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pID));
if(IsPlayerInAnyVehicle(playerid)) {
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
}
}
else SendClientMessage(playerid, COLOR_WHITE, "The playerid you entered is not connected.");
}
else SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this command.");
return 1;
}
the problem is the commands is not working properly like i have problem with ids plz help
Re: symbol is never used: "pID"[++rep] -
SecretBoss - 12.08.2015
I can't understand your problem
Re: symbol is never used: "pID"[++rep] -
Andre02 - 12.08.2015
Try this, if i understood your problem this should fix it:
PHP код:
CMD:gotoid(playerid, params[])
{
new pID, Float: X, Float: Y, Float: Z;
if(!PlayerInfo[playerid][pAdminLevel] >= 1) return SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this command.");
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /gotoid [playerid/name]");
if(!IsPlayerConnected(pID)) SendClientMessage(playerid, COLOR_WHITE, "The playerid you entered is not connected.");
GetPlayerPos(pID, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);
SetPlayerInterior(playerid, GetPlayerInterior(pID));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pID));
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
}
return 1;
}