SA-MP Forums Archive
playerspawn places - 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: playerspawn places (/showthread.php?tid=418608)



playerspawn places - sscarface - 25.02.2013

PHP код:
public OnPlayerSpawn(playerid)
{
 switch(
PlayerInfo[playerid][pCityChoice])
 {
     case 
1: //Los santos
         
SetPlayerPos(playerid, Los santos random coords.);
        case 
2: //Los santos
         
SetPlayerPos(playerid, San fierro random coords.);
         case 
3: //Los santos
         
SetPlayerPos(playerid, Las venturas random coords.);
 }
 return 
1;
}
CMD:s(playerid, params[])
{
 new 
choice;
 
SendClientMessage(playerid, -1, "Type /s (1/2/3) to choose between Los santos, San Fierro or Las venturas respectively.");
 if(
sscanf(params,"d",choice)) return SendClientMessage(playerid, -1, "Type /s (1/2/3) to choose between Los santos, San Fierro or Las venturas respectively.");
 else
 {
     
PlayerInfo[playerid][pCityChoice] = choice;
  if(
d == 1)
   return 
SendClientMessage(playerid, -1, "Chosen Los Santos.");
    if(
d ==2)
      return 
SendClientMessage(playerid, -1, "Chosen San Fierro.");
    else
     return 
SendClientMessage(playerid, -1, "Chosen Las Venturas.");
  }
  return 
1;
} 
it will BE work? JUST conforming


Re: playerspawn places - Luis- - 25.02.2013

It should work mate.


Re: playerspawn places - Daniel_Truk - 25.02.2013

That should work fine. Dont forget to define citychoice