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(playeridLos santos random coords.);
        case 
2//Los santos
         
SetPlayerPos(playeridSan fierro random coords.);
         case 
3//Los santos
         
SetPlayerPos(playeridLas venturas random coords.);
 }
 return 
1;
}
CMD:s(playeridparams[])
{
 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(
== 1)
   return 
SendClientMessage(playerid, -1"Chosen Los Santos.");
    if(
==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