23.04.2011, 16:07
Hey, how can i set different places to spawn my players? for excable, i want the player Nickx to spawn in a place that i will choose, and player MatrixX to spawn in other place, how to do this in my gamemode?
GetPlayerName
SetPlayerPos
SetPlayerInterior(maybe)
SetPlayerVirtualWorld(maybe)
Well you would have to get the player names when they spawn and move them to the cords you would like.
functions needed: pawn Код:
|
GetPlayerName SetPlayerPos SetPlayerInterior(maybe) SetPlayerVirtualWorld(maybe)
With GetPlayerName https://sampwiki.blast.hk/wiki/GetPlayerName
you get there name example Noob you do the scripting part im not doing it for you once you get there name SetPlayerPos(playerid,....); after that check if you are using a interior (inside a building) if not dont even use it. |
new
pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(strcmp(pName, "ThePlayersName", true) == 0)
{
SetPlayerPos(playerid, X, Y, Z);
}
else if(strcmp(pName, "TheOtherPlayersName", true) == 0)
{
SetPlayerPos(playerid, X, Y, Z);
}