pawn Код:
public OnPlayerSpawn(playerid)
{
bkstatus[playerid] = 0;
if(GetPlayerTeam(playerid) == Team_Cops)
{
new Random = random(sizeof(randomspawncop));
SetPlayerPos(playerid, randomspawncop[Random][0], randomspawncop[Random][1], randomspawncop[Random][2]);
SetPlayerFacingAngle(playerid, randomspawncop[Random][3]);
SetPlayerColor(playerid, Color_Blue);
new pname[MAX_PLAYERS], spawnmsg[100];
GetPlayerName(playerid, pname, sizeof(pname));
format(spawnmsg, sizeof(spawnmsg), "MSG: Player %s [%d] spawned as a COP", pname, playerid);
SendClientMessageToAll(Color_Blue, spawnmsg);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "MESSAGE..", "{FFFFFF}Welcome,\n you have spawned as a {0008FF}COP{FFFFFF}\nRules:\n1)Don't teamkill\n2)Don't use 3rd party programs aka Hacks\n3)Don't Hack because it leads to {EE0000}Ban{FFFFFF}\n4)Don't Spam in chat.\n5)Your team is {0008FF}COP {FFFFFF} so kill other {EE0000}TERRORISTS{FFFFFF}! \n6)More rules on "SITE"", "OK", "");
}
else if(GetPlayerTeam(playerid) == Team_Terrorists)
{
new Random = random(sizeof(randomspawnterr));
SetPlayerPos(playerid, randomspawnterr[Random][0], randomspawnterr[Random][1], randomspawnterr[Random][2]);
SetPlayerFacingAngle(playerid, randomspawnterr[Random][3]);
SetPlayerColor(playerid, Color_Red);
new pname[MAX_PLAYERS], spawnmsg[100];
GetPlayerName(playerid, pname, sizeof(pname));
format(spawnmsg, sizeof(spawnmsg), "MSG: Player %s [%d] spawned as a TERRORIST", pname, playerid);
SendClientMessageToAll(Color_Red, spawnmsg);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "MESSAGE..", "{FFFFFF}Welcome,\n you have spawned as a {EE0000}TERRORIST{FFFFFF}\nRules:\n1)Don't teamkill\n2)Don't use 3rd party programs aka Hacks\n3)Don't Hack because it leads to {EE0000}Ban{FFFFFF}\n4)Don't Spam in chat.\n5)Your team is {EE0000}TERRORIST {FFFFFF}so don't kill other {0008FF}TERRORIST{FFFFFF}! \n6)More rules on "SITE"", "OK", "");
}
GivePlayerWeapon(playerid, WEP_Knife, 1); //Knife
GivePlayerWeapon(playerid, WEP_Vibrator, 1); //Vibrator
GivePlayerWeapon(playerid, WEP_Sniper, 20); //Sniper
GivePlayerWeapon(playerid, WEP_Tear_Gas, 15); //Tear Gas
GivePlayerWeapon(playerid, WEP_Silenced_9mm, 50); //Silenced 9mm
GivePlayerWeapon(playerid, WEP_M4, 200); //M4
SetPlayerArmour(playerid, 100);
TextDrawShowForPlayer(playerid, text1);
//TextDrawShowForPlayer(playerid, text2);
TextDrawShowForPlayer(playerid, text4);
TextDrawShowForPlayer(playerid, text5);
return 1;
}