Jump to content

Probleme script


DavidTKD

Recommended Posts

Care ma puteti ajuta cu aceasta comanda /megaphone imi spune ca nu sunt in vehicului factiuni si defapt sunt. 

 

YCMD:megaphone(playerid, params[], help) {
    new tmpcar = GetPlayerVehicleID(playerid),textmeg[250],string[200];
    if(PlayerInfo[playerid][pMuted] == 1) {
        format(string, sizeof(string), "You can't talk right now! You are muted. (%d seconds)",PlayerInfo[playerid][pMuteTime]);
        SCM(playerid, COLOR_GREY, string);
        return 1;
    }
    if(sscanf(params, "s[250]", textmeg)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/m <text>");
    if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu faci parte din factiunea politiei.");
    if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
    if(!Copcar2(tmpcar)) return SCM(playerid, COLOR_GREY, "Nu esti intr-un vehicul de-al factiunii.");
    if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) format(string, sizeof(string), "> Ofiter %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2) format(string, sizeof(string), "> Agent %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3) format(string, sizeof(string), "> Soldat %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 14||PlayerInfo[playerid][pLeader] == 14) format(string, sizeof(string), "> Capitan %s: %s <", GetName(playerid), textmeg);
    ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
    return 1;
}

 

 

function IsACopCar(carid) {
    if(ServerVehicles[carid][vFaction] == 1) return 1;
    return 0;
}

function Copcar2(carid) {
    if(ServerVehicles[carid][vFaction] == 1) return 1;
    if(ServerVehicles[carid][vFaction] == 2) return 1;
    if(ServerVehicles[carid][vFaction] == 3) return 1;
    if(ServerVehicles[carid][vFaction] == 14) return 1;
    return 0;
}

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.