08.03.2012, 08:58 
	
	
	
		This is a complete solution for creating randrom spawn on the teleport command. 
That is, when you enter the command will take you to the randomly selected from an array of coordinates.
Variable:
CMD'S:
	
	
	
	
That is, when you enter the command will take you to the randomly selected from an array of coordinates.
Variable:
Код:
new Float:Vrand[4][4] =
{
    {-1310.9854,-23.8231,14.1484},{-1302.3235,-15.0138,14.1484},
    {-1288.9149,-28.7496,14.1484},{-1296.3196,-37.4355,14.1484}
};
STRCMP
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[25];
if(strcmp(cmd, "/tele", true) == 0)
{
    new vR = random(sizeof(Vrand));
    SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]);
    return true;
}
return false;
}
ZCMD
Код:
CMD:tele(playerid,params[])
{
    new vR = random(sizeof(Vrand));
    SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]);
    return true;
}
MCMD
Код:
mcmd_tele(playerid,params[])
{
    new vR = random(sizeof(Vrand));
    SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]);
    return true;
}
YCMD
Код:
YCMD:tele(playerid, params[], help)
{
    new vR = random(sizeof(Vrand));
    SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]);
    return true;
}
RCMD
Код:
rCmd:tele(playerid)
{
    new vR = random(sizeof(Vrand));
    SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]);
    return true;
}

