23.04.2012, 15:32
Okay, so it stops at #4. Try if it still crashes with this code.
pawn Code:
CMD:adminduty(playerid,params[])
{
print("#1");
new name[MAX_PLAYER_NAME], ip[24];
if(PlayerInfo[playerid][Admin] >1 || IsPlayerAdmin(playerid))
{
print("#2");
if(AdminDuty[playerid] == 1) return SendClientMessage(playerid, WHITE, ""COL_YELLOW"[INFO]"COL_WHITE"You already have Admin Duty on!");
print("#3");
AdminDuty[playerid] = 1;
SetPlayerHealth(playerid, 5000);
SetPlayerArmour(playerid, 100);
SetPlayerColor(playerid, CRVENA);
GivePlayerWeapon(playerid, 9, 20000);
GivePlayerWeapon(playerid, 18, 20000);
GivePlayerWeapon(playerid, 24, 20000);
GivePlayerWeapon(playerid, 26, 20000);
GivePlayerWeapon(playerid, 28, 20000);
GivePlayerWeapon(playerid, 29, 20000);
GivePlayerWeapon(playerid, 30, 20000);
GivePlayerWeapon(playerid, 31, 20000);
GivePlayerWeapon(playerid, 38, 20000);
GivePlayerWeapon(playerid, 36, 20000);
print("#4");
}
else {
print("#7: server is returning false(value: 0) for: AdminDuty[playerid] > 1, IsPlayerAdmin(playerid)");
SendClientMessage(playerid, WHITE, ""COL_YELLOW"[INFO]"COL_WHITE"Sorry,you don't have persmission to use this command!");
}
print("#8");
return 1;
}