questions
#1

Hi.

I have this goto command and if someone is in a stadium and I goto, it will be all white.. its the same with /get when im in a stadium and i do /get it will be white for them

i got this, but doesnt work please help

pawn Код:
COMMAND:goto(playerid,params[])
{
    new pid;
    new world = GetPlayerVirtualWorld(playerid);
    new interior = GetPlayerInterior(playerid);
    if(PlayerInfo[playerid][pAdminLevel] >=1)
    {
        if(sscanf(params, "u", pid)) return SendClientMessage(playerid, Yellow, "USAGE: /goto <playerid>");
        if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, Red, "Player not connected");
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(pid,X, Y, Z);
        SetPlayerPos(playerid,X, Y, Z);
        SetPlayerInterior(pid,interior);
        SetPlayerVirtualWorld(pid, world);
        SendClientMessage(playerid, Green, "Teleported !");
    } else if(PlayerInfo[playerid][pAdminLevel] == 0) return 0;
    return 1;
}
Also how can I make a command only work with PLAYERID not name with sscanf?
Reply
#2

1st problem:
Add this somewhere in the cmd:
pawn Код:
SetPlayerInterior( playerid, GetPlayerInterior( pid ) );
2nd problem:
pawn Код:
if(sscanf(params, "d", pid)) return SendClientMessage(playerid, Yellow, "USAGE: /goto <playerid>");
Use "d" instead of "u".
Reply
#3

only interior not virutalworld?
Reply
#4

Not vw, vw is the world player is in, if you are in world 1, and player is in 0, you will see the walls, but you will not see the player that is in vw 0.
But you can also set vw
pawn Код:
SetPlayerVirtualWorld( playerid, GetPlayerVirtualWorld( pid ) );
Reply
#5

ok thanks, i will try later.. I will not delete this?
pawn Код:
SetPlayerInterior(pid,interior);
        SetPlayerVirtualWorld(pid, world);
?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)