30.07.2010, 15:10
Hay, Im trying to find a /goto cmd (tele player to player) but all the cmds I find is admin cmds... I dont want it to be admin cmd... Can anyone help me? :S
CMD:goto(playerid, params[])
{
new Float:x, Float:y, Float:z;
new playerid2;
if(sscanf(params, "u", playerid2))
{
SendClientMessage(playerid, Orange, "USAGE : /goto [playerid]");
SendClientMessage(playerid, Lightblue, "FUNCTION : Goto a particular players position");
}
else if(playerid2 == INVALID_PLAYER_ID) SendClientMessage(playerid, Red, "ERROR : That player is not connected!");
else if(playerid2 == playerid) SendClientMessage(playerid, Red, "ERROR : You cant go to yourself!");
else
{
GetPlayerPos(playerid2, x, y, z);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(playerid2));
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(playerid2));
SetVehiclePos(GetPlayerVehicleID(playerid), x+2, y,z);
SetVehicleZAngle(GetPlayerVehicleID(playerid),0.0);
}
else
{
SetPlayerPos(playerid, x+2, y, z);
SetPlayerInterior(playerid, GetPlayerInterior(playerid2));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid2));
}
}
return 1;
}
C:\Documents and Settings\ben\Desktop\junk\Server\filterscripts\cmds.pwn(350) : error 029: invalid expression, assumed zero C:\Documents and Settings\ben\Desktop\junk\Server\filterscripts\cmds.pwn(350) : error 017: undefined symbol "cmd_goto" C:\Documents and Settings\ben\Desktop\junk\Server\filterscripts\cmds.pwn(350) : error 029: invalid expression, assumed zero C:\Documents and Settings\ben\Desktop\junk\Server\filterscripts\cmds.pwn(350) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.