[Help]Teleport command
#1

Hey all, this is what i need help with>>>

I made a command to teleport to 1 of the random spawn of my deathmatch area with this

// .. Constant array of coordinates for teleports for /dm.
stock const Float:bDMTeles[ ][ DATA_DM_TPS ] =
{
{ 21.0751,1547.0956,62.4036, },
{ 52.3493,1542.8513,62.4036, },
{ 43.6202,1535.9438,62.4036, },
{ 18.3034,1530.6904,51.6787, },
{ 16.0733,1521.2104,61.2056, },
{ 20.5655,1521.0940,51.3060, },
{ 16.0387,1540.8397,51.3060, }
};
public OnPlayerCommandText(playerid, cmdtext[])
{
if( !strcmp(cmdtext, "/glass") )
{
//If they typed /dm, create a new random variable ranging from 0 to the
//size of the array of coordinates.
new nRand = random(sizeof bDMTeles);
//Set the player's position to one of the random entries within the array.
SetPlayerPos( playerid, bDMTeles[nRand][X], bDMTeles[nRand][Y], bDMTeles[nRand][Z] );
//Return true.
return 1;
}

I need to know how i would make them spawn there with a certain weapon?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)