Random Spawns[SOLVED](FINALY)
#1

How will i make when that player spawns somwhere it will say like You have been spawned on Sky Road (/SKROAD)?.
Quote:

new randspawn=random(4);
switch(randspawn)
{
case 0:SetPlayerPos(playerid, 3922.5779,-1608.7214,1441.8087);
case 1:SetPlayerPos(playerid, -2364.0378,-1617.5299,490.5154);
case 2:SetPlayerPos(playerid, 1549.9720,-1675.3169,15.2003);
case 3:SetPlayerPos(playerid, -1970.8075,137.8790,27.6875);
}

Ty for helping

Now i tryed this :

Quote:

new randspawn=random(4);
switch(randspawn)
{
case 0:
{
SetPlayerPos(playerid, 3922.5779,-1608.7214,1441.8087);
SendClientMessage(playerid, COLOR_RED, "You have spawned at Sky Road (/skroad)");
}
case 1:
{
SetPlayerPos(playerid, -2364.0378,-1617.5299,490.5154);
SendClientMessage(playerid, COLOR_RED, "You have spawned at MT. Chilliad (/chilliad)");
}
case 2:
{
SetPlayerPos(playerid, 1549.9720,-1675.3169,15.2003);
SendClientMessage(playerid, COLOR_RED, "You have spawned at Los Santos (/ls)");
}
case 3:
{
SetPlayerPos(playerid, -1970.8075,137.8790,27.6875);
SendClientMessage(playerid, COLOR_RED, "You have spawned at San Fierro (/sf)");
}

But this crashes my pawno anyone know why ?
Reply
#2


Code:
  new randspawn=random(4);  
  switch(randspawn)
  {
  case 0:
  {
    SetPlayerPos(playerid, 3922.5779,-1608.7214,1441.8087);
    SendClientMessage(playerid, 0xAAAAAAAA, "You have spawned at location ....");
  }
  case 1:SetPlayerPos(playerid, -2364.0378,-1617.5299,490.5154);
  case 2:SetPlayerPos(playerid, 1549.9720,-1675.3169,15.2003);
  case 3:SetPlayerPos(playerid, -1970.8075,137.8790,27.6875);
  }
Reply
#3

Quote:
Originally Posted by mansonh
Code:
  new randspawn=random(4);  
  switch(randspawn)
  {
  case 0:
  {
    SetPlayerPos(playerid, 3922.5779,-1608.7214,1441.8087);
    SendClientMessage(playerid, 0xAAAAAAAA, "You have spawned at location ....");
  }
  case 1:SetPlayerPos(playerid, -2364.0378,-1617.5299,490.5154);
  case 2:SetPlayerPos(playerid, 1549.9720,-1675.3169,15.2003);
  case 3:SetPlayerPos(playerid, -1970.8075,137.8790,27.6875);
  }
ah ty xD

EDIT: Crashes my pawno like one before i did...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)