SA-MP Forums Archive
Simple Question. - 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: Simple Question. (/showthread.php?tid=360531)



Simple Question. - [A]ndrei - 18.07.2012

Hey when you goto
pawn Код:
SetPlayerVirtualWorld(playerid, 3);
Howto go back to the origanal word...i know you need a cmd...
but whats the world number thenor there is none?


Re: Simple Question. - [A]ndrei - 18.07.2012

Another question when i type something my id wont show...


Re: Simple Question. - Rudy_ - 18.07.2012

Quote:
Originally Posted by [A]ndrei
Посмотреть сообщение
Hey when you goto
pawn Код:
SetPlayerVirtualWorld(playerid, 3);
Howto go back to the origanal word...i know you need a cmd...
but whats the world number thenor there is none?
pawn Код:
SetPlayerVirtualWorld(playerid, 0); //0 is original



Re: Simple Question. - [A]ndrei - 18.07.2012

thanks


Re: Simple Question. - ZBits - 18.07.2012

Quote:
Originally Posted by [A]ndrei
Посмотреть сообщение
Another question when i type something my id wont show...
you need to add playerid at the float part

example
pawn Код:
if (strcmp("/backtovworld", cmdtext, true, 10) == 0)
{
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"%s(%d) has changed his/her virtual world to 0",name,playerid);
SendClientMessage(playerid,-1,string);
SetPlayerVirtualWorld(playerid,0);
}
return 1;
}



Re: Simple Question. - [A]ndrei - 18.07.2012

hey i got a problem when i use CMD:joinrace WITH the virtuial world thing my car wont spawn...
help please heres the command im trying to use...
pawn Код:
CMD:joinrace(playerid, params[])
{
    if(RaceStarted == 1) return SendClientMessage(playerid, RED, "<!> Race already started! Wait first till race ends!");
    if(RaceBusy == 0x00) return SendClientMessage(playerid, RED, "<!> There's no race to join!");
    if(Joined[playerid] == true) return SendClientMessage(playerid, RED, "<!> You already joined a race!");
    if(IsPlayerInAnyVehicle(playerid)) return SetTimerEx("SetupRaceForPlayer", 2500, 0, "e", playerid), RemovePlayerFromVehicle(playerid), Joined[playerid] = true;
    SetupRaceForPlayer(playerid);
    Joined[playerid] = true;
    return 1;
}



Re: Simple Question. - ZBits - 18.07.2012

pawn Код:
CMD:joinrace(playerid, params[])
{
    if(RaceStarted == 1) return SendClientMessage(playerid, RED, "<!> Race already started! Wait first till race ends!");
    if(RaceBusy == 0x00) return SendClientMessage(playerid, RED, "<!> There's no race to join!");
    if(Joined[playerid] == true) return SendClientMessage(playerid, RED, "<!> You already joined a race!");
    if(IsPlayerInAnyVehicle(playerid)) return SetTimerEx("SetupRaceForPlayer", 2500, 0, "e", playerid), Joined[playerid] = true;
    SetupRaceForPlayer(playerid);
    Joined[playerid] = true;
    return 1;
}
try removing RemovePlayerFromVehicle(playerid);

+rep if that helped


Re: Simple Question. - Rudy_ - 18.07.2012

No Don't remove that, you need to set a vehicle for player
use
pawn Код:
PutPlayerInVehicle(playerid, vehicleid, 0);



Re: Simple Question. - ZBits - 18.07.2012

o yeah


Re: Simple Question. - [A]ndrei - 18.07.2012

wait wait so give me the hole cmd im confused :/