23.10.2012, 03:23
To make random spawns follow these instructions.
Requirements - Basic Knowledge of where to paste things, SA:MP Server Files, A script Editor, Brain :P
Lets start
First of all paste this on top of your script..i mean outside any callback
Now change your command to
Thank You!
Hope you understood.
Requirements - Basic Knowledge of where to paste things, SA:MP Server Files, A script Editor, Brain :P
Lets start
First of all paste this on top of your script..i mean outside any callback
pawn Код:
new Float:DMSpawns[][4] =
{
{X,Y,Z, Angle(this is important)},
{X,Y,Z, Angle(this is important)},
{X,Y,Z, Angle(this is important)},
//continue adding more if you want..
//NOTE - in the last spawn location, instead of comma(,) in the end put nothing.
};
pawn Код:
if (strcmp(cmdtext,"/area51dm", true, 9) ==0)
{
if(IsAtDMArea[playerid] == 1) return SendClientMessage(playerid, red, "You already are at dm area");
if(IsAtDM[playerid] == 2) return GameTextForPlayer(playerid, "~r~/~w~exitdm", 2000, 5);
if(IsAtDM[playerid] == 3) return GameTextForPlayer(playerid, "~r~/~w~exitdm", 2000, 5);
if(IsAtDM[playerid] == 4) return GameTextForPlayer(playerid, "~r~/~w~exitdm", 2000, 5);
if(IsAtDM[playerid] == 5) return GameTextForPlayer(playerid, "~r~/~w~exitdm", 2000, 5);
if(IsAtDM[playerid] == 6) return GameTextForPlayer(playerid, "~r~/~w~exitdm", 2000, 5);
if(IsAtDM[playerid] == 7) return GameTextForPlayer(playerid, "~r~/~w~exitdm", 2000, 5);
if(IsAtDM[playerid] == 8) return GameTextForPlayer(playerid, "~r~/~w~exitdm", 2000, 5);
new rand = random(sizeof(DMSpawns));
SetPlayerPos(playerid,DMSpawns[rand][0], DMSpawns[rand][1],DMSpawns[rand][2]);
SetPlayerFacingAngle(playerid,DMSpawns[rand][3]);
new str[128],name[24];
GetPlayerName(playerid,name,24);
format(str,sizeof(str),"~r~%s ~w~has teleported to /area51dm",name);
TextDrawSetString(teleporttext,str);
GivePlayerWeapon(playerid,24,100);//------Deagle
GivePlayerWeapon(playerid,27,100);//------Combat Shotgun
GivePlayerWeapon(playerid,34,100);//------Sniper Rifle
TextDrawShowForAll(teleporttext);
SendClientMessage(playerid,yellow,"Welcome To The Area51 Death match! to Exit use /exitdm!!!");
dm1[playerid] = 1;
IsAtDMArea[playerid] = 1;
IsAtDM[playerid] = 1;
SetTimerEx("HIDE_TELEPORT_TD", 9000, 0, "d", playerid);
return 1;
}
Hope you understood.