01.06.2012, 15:56
How about, when an admin /startbattle
all COPS will be TP'd there, and CRIMINALS will be TP'd there, give em guns, and they start to fight...
Here you go (You'll need ZCMD, sscanf, and an enum for the Adminrank)
Now, once their there, the admin uses (/startbattle) to start it..
Glad to help.
all COPS will be TP'd there, and CRIMINALS will be TP'd there, give em guns, and they start to fight...
Here you go (You'll need ZCMD, sscanf, and an enum for the Adminrank)
Код:
COMMAND:battle(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 2) //change 2 to whatever admin level you want it to be. { for(new i = 0; i < MAX_PLAYERS; i++) if(GetPlayerTeam(i) == Cops) { SetPlayerPos(i, //pos for the COPS in the battle); GivePlayerWeapon(i, weaponid, 100); //search for GivePlayerWeapon on wiki, you'll get a list of guns //Here you can also give them other guns, just copy/paste the function above, and change the weaponid to whatever you want TogglePlayerControllable(i, 0); // freeze's them } else if(GetPlayerTeam(i) == Criminals) { SetPlayerPos(i, //pos for the CRIMINALS in the battle); GivePlayerWeapon(i, weaponid, 100); //search for GivePlayerWeapon on wiki, you'll get a list of guns //Here you can also give them other guns, just copy/paste the function above, and change the weaponid to whatever you want TogglePlayerControllable(i, 0); // freeze's them. } } return 1; }
Код:
COMMAND:startbattle(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 2) { for(new i = 0; i < MAX_PLAYERS; i++) TogglePlayerControllable(i, 1); if(GetPlayerTeam(i) == Cops) { SendClientMessage(i, COLOR_WHITE, "The battle has began! kill the criminals!"); } else if(GetPlayerTeam(i) == Criminals) { SendClientMessage(i, COLOR_WHITE, "The battle has began! kill the criminals!"); } } return 1; }