19.08.2011, 18:13
Is this possible, im working on a /goto and a /gethere commands and i want it to grab the "ID's" Virutal World then set it for the playerid, but is there a way to do it without getting
I know the reason of this warning its because that the code should be
SetPlayerVirtualWorld(playerid,0);
How would i set it so that it grabs the Ids Virtual world?
I know that im pretty much on the right track, heres my code.
PHP код:
warning 202: number of arguments does not match definition
SetPlayerVirtualWorld(playerid,0);
How would i set it so that it grabs the Ids Virtual world?
I know that im pretty much on the right track, heres my code.
pawn Код:
CMD:goto(playerid,params[])
{
new id,Float:X,Float:Y,Float:Z,pName[MAX_PLAYER_NAME],string[126],iName[MAX_PLAYER_NAME],string2[126];
if(sscanf(params, "u",id))SendClientMessage(playerid,COLOR_RED,"Usage: /Goto [ID]");
if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
else
{
GetPlayerVirtualWorld(id);
SetPlayerVirtualWorld(playerid);
GetPlayerInterior(id);
SetPlayerInterior(playerid);
GetPlayerPos(id,X,Y,Z);
SetPlayerPos(playerid,X,Y,Z);
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string,128,"Admin %s has teleported to you",pName);
SendClientMessage(id,COLOR_ORANGE,string);
GetPlayerName(id, iName, MAX_PLAYER_NAME);
format(string2,128,"You have gone to %s",iName);
SendClientMessage(id,COLOR_ORANGE,string2);
}
return 1;
}