05.08.2009, 22:01
at the top of your script put this..
but change the coords to the positions you have for your dm zones.
then...
put this in onplayercommandtext
make sure you rename the islanddmspawns to something that will remind you of the dm zone.
also make sure that with the "new Float:islanddmspawns[16][3] = {," that the count "[16]" shows the ammount of coord lines you have. If not it will make your script not compile.
that should set it so when you join the dm, you spawn at random positions..
lol, i just cant get the respawning right when you die in a dm, to rejoin lol.
good luck
Quote:
new Float:islanddmspawns[16][3] = { {-696.7625,3204.0144,4.9366}, // {-689.1344,3143.2222,7.9124}, // {-678.8207,3080.6030,7.1543}, // {-584.0181,3169.3674,12.3154}, // {-566.2000,3195.5068,4.9366}, // {-787.4612,3209.4063,12.3904}, // {-787.5907,3209.1912,20.7903}, // {-854.7209,3171.4958,4.9366}, // {-816.1633,3366.1816,5.0116}, // {-785.6259,3428.3169,6.4401}, // {-693.5211,3396.4290,9.0503}, // {-693.8293,3365.3694,12.4654}, // {-693.9604,3365.2095,20.8653}, // {-661.2188,3329.9993,4.2272}, // {-564.4163,3390.7454,12.4154}, // {-527.9631,3421.4661,4.9366} // }; |
then...
put this in onplayercommandtext
Quote:
if(strcmp(cmdtext, "/islanddm", true)==0) { SetPlayerInterior(playerid, 0); new rand = random(sizeof(islanddmspawns)); SetPlayerPos(playerid, islanddmspawns[rand][0], islanddmspawns[rand][1], islanddmspawns[rand][2]); SetPlayerFacingAngle(playerid, 0.0); GivePlayerWeapon(playerid,46,1); SendClientMessage(playerid, COLOR_BLUE, "DEATHMATCH ISLAND"); GivePlayerWeapon(playerid,24,1000); GivePlayerWeapon(playerid,27,1000); GivePlayerWeapon(playerid,30,1000); GivePlayerWeapon(playerid,34,1000); GivePlayerWeapon(playerid,35,1000); SetPlayerArmour(playerid,100); SendClientMessage(playerid,0x33AA33AA,"You can leave the dm by typing /exitdm"); DMZone[playerid] = 1; return 1; |
also make sure that with the "new Float:islanddmspawns[16][3] = {," that the count "[16]" shows the ammount of coord lines you have. If not it will make your script not compile.
that should set it so when you join the dm, you spawn at random positions..
lol, i just cant get the respawning right when you die in a dm, to rejoin lol.
good luck