28.02.2010, 17:55
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
if(!strcmp(cmdtext, "/skroad"))
{
SetPlayerPos(playerid, 2208.957031, 3108.475830, 4089.916016);
SendClientMessage(playerid, 0xDF1818AA , "SKROAD");
return 1;
}
if(!strcmp(cmdtext, "/stunt-park"))
{
SetPlayerPos(playerid, 2119.0869, -2616.2554, 13.5469);
SendClientMessage(playerid, 0xDF1818AA , "Stunt-Park");
return 1;
}
new Float:Spawn1X = 657.95;
new Float:Spawn1Y = 2105.79
new Float:Spawn1Z = 60.37;
public OnPlayerSpawn(playerid)
{
new rand = random(4); //rand can have value from 0 to 3
if(rand == 0) SetPlayerPos(playerid, Spawn1X, Spawn1Y, Spawn1Z);
if(rand == 1) SetPlayerPos(playerid, other coords);
if(rand == 2) SetPlayerPos(playerid, other coords);
if(rand == 3) SetPlayerPos(playerid, other coords);
return 1;
}
return 0;
}
And i will that only on /big-jump the random spawn is.
I know i must edit "if(rand == 3) SetPlayerPos(playerid, other coords);"

