Offduty CMD
#1

The problem is I can use the cmd 2 times insted of 1 time then in the second try it Should say You're already on duty(Vec si na duћnosti!). It's says that on the 3rd try. Help!

PHP код:
COMMAND:offduty(playerid)
{
    new 
string[100], name[MAX_PLAYER_NAME];
    if (
APlayerData[playerid][LoggedIn] == true && APlayerData[playerid][PlayerLevel] > 1)
    {
    
        if(
APlayerData[playerid][cmdoffduty] >= 1) return SendClientMessage(playerid0xFF0000FF"Nisi na duznosti");
    
        
JBC_SetPlayerHealth(playerid99.0);
        
SetPlayerArmour(playerid0);
        
GetPlayerName(playeridnamesizeof(name));
        
format(stringsizeof(string), "(( Administrator {00CCFF}%s {FFFFFF}nije vise na duznosti! ))"name);
        
SendClientMessageToAll(-1string);
        
APlayerData[playerid][cmdoffduty]++;
        if(
APlayerData[playerid][cmdoffduty] == 1
        {
APlayerData[playerid][cmdduty]--;}
        
SetPVarInt(playerid"Izbegavanje"0);
    }
    return 
1;

Reply
#2

Can you please translated to english?
Reply
#3

Evo ti primjer:

Kada hoces da ides na duznost

pawn Код:
if(IsPlayerAdmin(playerid)) //Stavi svoju funkciju za provjeru dali je Igrac administrator
    if(ADuznost[playerid] == 1) return SendClientMessage(playerid,-1, "Vec si na admin duznosti, upisi /duznostoff kako vise nebi bio!"); Ovo je samo primjer dodaj svoju funkciju
Kada hoces da odes sa duznosti

pawn Код:
if(IsPlayerAdmin(playerid)) //Stavi svoju funkciju za provjeru dali je Igrac administrator
    if(ADuznost[playerid] == 0) return SendClientMessage(playerid,-1, "Vise ni nisi na admin duznosti,, upisi /duznoston kako bi bio!"); Ovo je samo primjer dodaj svoju funkciju
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)