Jump to content
  • 0

Samp Script


DavidTKD

Question

Salut. As dori sa stiu daca se poate face urmatorul lucru la mafii comanda /order 1,2,3,4,5,6 sa fie in functie de rank pentru fiecare membru. Aici am comanda daca ma puteti ajuta

 

CMD:order(playerid, params[]) {

    if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
    {
        new result[30];
        if(!PlayerToPoint(100.0, playerid, -2158.6482,642.3111,1052.3750)) return SendClientMessage(playerid, COLOR_GREY, "Nu esti in HQ!");
        if(PlayerHit[playerid] == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Poti lua arme doar atunci cand ai un contract!");
        if(sscanf(params, "s[30]", result)) {
            SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/order <id>");
            SendClientMessage(playerid, COLOR_WHITE, "1. Knife (10 $) | 2. SD-Pistol (100 $) | 3. Sniper (200 $)");
            return 1;
        }
        if(PlayerInfo[playerid][pGunLic] == 0) return SCM(playerid,-1,"Nu ai licenta de arme!");
        if(strcmp(result,"1",true) == 0) {
            if(GetPlayerCash(playerid) < 10) return 1;
            ServerWeapon(playerid, 4, 200);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un cutit la pretul de 10$.");
            GivePlayerCash(playerid, -10);
            return 1;
        }
        else if(strcmp(result,"2",true) == 0) {
            if(GetPlayerCash(playerid) < 100) return 1;
            ServerWeapon(playerid, 23, 200);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un SD-Pistol la pretul de 100$.");
            GivePlayerCash(playerid, -100);
            return 1;
        }
        else if(strcmp(result,"3",true) == 0) {
            if(GetPlayerCash(playerid) < 200) return 1;
            ServerWeapon(playerid, 34, 200);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un Sniper la pretul de 200$.");
            GivePlayerCash(playerid, -200);
            return 1;
        }
        else return SendClientMessage(playerid, COLOR_GREY, "Invalid id!");
    }    
    if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 ||
    PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
    {    
        if(PlayerInfo[playerid][pGunLic] == 0) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu ai licenta de arme. Cauta un instructor pentru a obtine licenta.");
        if(GetPlayerInterior(playerid) == 0) return SendClientMessage(playerid, COLOR_WHITE,"Nu esti in HQ.");
        if(!IsAtOrderPlace(playerid)) return 1;
        //if(InWar[PlayerInfo[playerid][pMember]] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Poti lua arme doar atunci cand mafia ta are un razboi!");
        new result[180];
        new x = PlayerInfo[playerid][pMember]-1;
        if(SafeInfo[x][sMaterials] < 1) return SCM(playerid, COLOR_CLIENT, "Nu sunt suficiente materiale in seif!");
        if(SafeInfo[x][sMoney] < 1) return SCM(playerid, COLOR_CLIENT, "Nu sunt suficienti bani in seif!");
        if(sscanf(params, "s[30]", result)) {
            SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/order <id>");
            SCM(playerid, COLOR_GRAD3, "1. Deagle - 200 ammo - 220$ - 200 mats");
            SCM(playerid, COLOR_GRAD3, "2. M4 - 600 ammo - 310$ - 320 mats");
            SCM(playerid, COLOR_GRAD3, "3. AK47 - 600 ammo - 300$ - 320 mats");
            SCM(playerid, COLOR_GRAD3, "4. Rifle - 300 ammo - 535$ - 400 mats");
            SCM(playerid, COLOR_GRAD3, "5. TEC9 - 400 ammo - 450$ - 370 mats");
            SCM(playerid, COLOR_GRAD3, "6. Combat Shotgun - 200 ammo - 530$ - 250 mats");
            return 1;
        }
        if(PlayerInfo[playerid][pGunLic] == 0) return SCM(playerid,-1,"Nu ai licenta de arme!");
        if(strcmp(result,"1",true) == 0) {
            ServerWeapon(playerid, 24, 200);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un deagle la pretul de 220$.");
            SafeInfo[x][sMaterials] -= 200;
            SafeInfo[x][sMoney] -= 220;
        }
        else if(strcmp(result,"2",true) == 0) {
            ServerWeapon(playerid, 31, 600);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un M4 la pretul de 310$.");
            SafeInfo[x][sMaterials] -= 320;
            SafeInfo[x][sMoney] -= 310;
        }
        else if(strcmp(result,"3",true) == 0) {
            ServerWeapon(playerid, 30,600);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un AK47 la pretul de 300$.");
            SafeInfo[x][sMaterials] -= 320;
            SafeInfo[x][sMoney] -= 300;
        }
        else if(strcmp(result,"4",true) == 0) {
            ServerWeapon(playerid, 33, 300);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un Rifle la pretul de 535$.");
            SafeInfo[x][sMaterials] -= 400;
            SafeInfo[x][sMoney] -= 535;
        }        
        else if(strcmp(result,"5",true) == 0) {
            ServerWeapon(playerid, 32, 400);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un TEC9 la pretul de 450$.");
            SafeInfo[x][sMaterials] -= 370;
            SafeInfo[x][sMoney] -= 450;
        }    
        else if(strcmp(result,"6",true) == 0) {
            ServerWeapon(playerid, 27, 200);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un Combat Shotgun la pretul de 530$.");
            SafeInfo[x][sMaterials] -= 250;
            SafeInfo[x][sMoney] -= 530;
        }            
    }
    else SendClientMessage(playerid, COLOR_GREY, "Nu esti membrul unei mafii.");
    return 1;
}

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
		if(strcmp(result,"1",true) == 0) {
  			if(PlayerInfo[playerid][pRank] >= 1)
            ServerWeapon(playerid, 24, 200);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un deagle la pretul de 220$.");
            SafeInfo[x][sMaterials] -= 200;
            SafeInfo[x][sMoney] -= 220;
        }
        else if(strcmp(result,"2",true) == 0) {
          	if(PlayerInfo[playerid][pRank] >= 2)
            ServerWeapon(playerid, 31, 600);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un M4 la pretul de 310$.");
            SafeInfo[x][sMaterials] -= 320;
            SafeInfo[x][sMoney] -= 310;
        }
        else if(strcmp(result,"3",true) == 0) {
        	if(PlayerInfo[playerid][pRank] >= 3)
            ServerWeapon(playerid, 30,600);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un AK47 la pretul de 300$.");
            SafeInfo[x][sMaterials] -= 320;
            SafeInfo[x][sMoney] -= 300;
        }
        else if(strcmp(result,"4",true) == 0) {
            ServerWeapon(playerid, 33, 300);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un Rifle la pretul de 535$.");
            SafeInfo[x][sMaterials] -= 400;
            SafeInfo[x][sMoney] -= 535;
        }        
        else if(strcmp(result,"5",true) == 0) {
            if(PlayerInfo[playerid][pRank] >= 5)
            ServerWeapon(playerid, 32, 400);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un TEC9 la pretul de 450$.");
            SafeInfo[x][sMaterials] -= 370;
            SafeInfo[x][sMoney] -= 450;
        }    
        else if(strcmp(result,"6",true) == 0) {
         	if(PlayerInfo[playerid][pRank] >= 6)
            ServerWeapon(playerid, 27, 200);
            SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un Combat Shotgun la pretul de 530$.");
            SafeInfo[x][sMaterials] -= 250;
            SafeInfo[x][sMoney] -= 530;
        }            

 

maxresdefault.jpg

 

 

 

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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.