- 0
Samp Script
-
Similar Content
-
- 0 replies
- 194 views
-
- 3 replies
- 517 views
-
Index samp
By zXk.,
- 8 replies
- 294 views
-
- 2 replies
- 318 views
-
- 15 replies
- 1,139 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
DavidTKD
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.