28.04.2017, 15:06
Hi I Have A problem I Want Change this cmd to dialog like this
[IMG][/IMG]
My Cmd Is Please help me to change it
[IMG][/IMG]
My Cmd Is Please help me to change it
PHP Code:
CMD:skill(playerid, params[])
{
if(isnull(params))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /skill [number]");
SendClientMessage(playerid, COLOR_GREY, "| 1: Detective 7: Car Mechanic");
SendClientMessage(playerid, COLOR_GREY, "| 2: Lawyer 8: Boxer");
SendClientMessage(playerid, COLOR_GREY, "| 3: Whore 9: Fishing");
SendClientMessage(playerid, COLOR_GREY, "| 4: Drugs Dealer 10: Trucker");
SendClientMessage(playerid, COLOR_GREY, "| 5: Drug Smuggler 11: Car Jacker ");
//SendClientMessage(playerid, COLOR_GREY, "| 6: Arms Dealer");
SendClientMessage(playerid, COLOR_GREY, "| 6: Arms Dealer 12: Craftman");
return 1;
}
else switch(strval(params)) {
case 1: //Detective
{
new level = PlayerInfo[playerid][pDetSkill], string[48];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detective Skill Level = 1."); format(string, sizeof(string), "You need to find %d more people to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detective Skill Level = 2."); format(string, sizeof(string), "You need to find %d more people to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detective Skill Level = 3."); format(string, sizeof(string), "You need to find %d more people to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detective Skill Level = 4."); format(string, sizeof(string), "You need to find %d more people to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Detective Skill Level = 5."); }
}
case 2://Lawyer
{
new level = PlayerInfo[playerid][pLawSkill], string[48];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Lawyer Skill Level = 1."); format(string, sizeof(string), "You need to free %d more people to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Lawyer Skill Level = 2."); format(string, sizeof(string), "You need to free %d more people to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Lawyer Skill Level = 3."); format(string, sizeof(string), "You need to free %d more people to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Lawyer Skill Level = 4."); format(string, sizeof(string), "You need to free %d more people to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Lawyer Skill Level = 5."); }
}
case 3://Whore
{
new level = PlayerInfo[playerid][pSexSkill], string[48];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Whore Skill Level = 1."); format(string, sizeof(string), "You need to have sex %d times more to level up.", 50- level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Whore Skill Level = 2."); format(string, sizeof(string), "You need to have sex %d times more to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Whore Skill Level = 3."); format(string, sizeof(string), "You need to have sex %d times more to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Whore Skill Level = 4."); format(string, sizeof(string), "You need to have sex %d times more to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Whore Skill Level = 5."); }
}
case 4://Drugs Dealer
{
new level = PlayerInfo[playerid][pDrugsSkill], string[50];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Dealer Skill Level = 1."); format(string, sizeof(string), "You need to sell drugs %d times more to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Dealer Skill Level = 2."); format(string, sizeof(string), "You need to sell drugs %d times more to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Dealer Skill Level = 3."); format(string, sizeof(string), "You need to sell drugs %d times more to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Dealer Skill Level = 4."); format(string, sizeof(string), "You need to sell drugs %d times more to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Dealer Skill Level = 5."); }
}
case 5://Drug Smuggling
{
new level = PlayerInfo[playerid][pSmugSkill], string[53];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Smuggling Skill Level = 1."); format(string, sizeof(string), "You need to smuggle %d more drug crates to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Smuggling Skill Level = 2."); format(string, sizeof(string), "You need to smuggle %d more drug crates to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Smuggling Skill Level = 3."); format(string, sizeof(string), "You need to smuggle %d more drug crates to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Smuggling Skill Level = 4."); format(string, sizeof(string), "You need to smuggle %d more drug crates to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Drug Smuggling Skill Level = 5."); }
}
case 6://Arms Dealer
{
new level = PlayerInfo[playerid][pArmsSkill], string[48];
if(level >= 0 && level < 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Arms Dealer Skill Level = 1."); format(string, sizeof(string), "You need to sell %d more guns to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 50 && level < 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Arms Dealer Skill Level = 2."); format(string, sizeof(string), "You need to sell %d more guns to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 100 && level < 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Arms Dealer Skill Level = 3."); format(string, sizeof(string), "You need to sell %d more guns to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 200 && level < 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Arms Dealer Skill Level = 4."); format(string, sizeof(string), "You need to sell %d more guns to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Arms Dealer Skill Level = 5."); }
}
case 7://Car Mechanic
{
new level = PlayerInfo[playerid][pMechSkill], string[60];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Mechanic Skill Level = 1."); format(string, sizeof(string), "You need to fix/refill a car for %d times more to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Mechanic Skill Level = 2."); format(string, sizeof(string), "You need to fix/refill a car for %d times more to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Mechanic Skill Level = 3."); format(string, sizeof(string), "You need to fix/refill a car for %d times more to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Mechanic Skill Level = 4."); format(string, sizeof(string), "You need to fix/refill a car for %d times more to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Mechanic Skill Level = 5."); }
}
case 8://Boxer
{
new level = PlayerInfo[playerid][pBoxSkill], string[48];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Boxing Skill Level = 1."); format(string, sizeof(string), "You need to Win %d more Matches to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Boxing Skill Level = 2."); format(string, sizeof(string), "You need to Win %d more Matches to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Boxing Skill Level = 3."); format(string, sizeof(string), "You need to Win %d more Matches to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Boxing Skill Level = 4."); format(string, sizeof(string), "You need to Win %d more Matches to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Boxing Skill Level = 5."); }
}
case 9://Fishing
{
new level = PlayerInfo[playerid][pFishSkill], string[48];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Fishing Skill Level = 1."); format(string, sizeof(string), "You need to Fish %d more Fishes to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Fishing Skill Level = 2."); format(string, sizeof(string), "You need to Fish %d more Fishes to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Fishing Skill Level = 3."); format(string, sizeof(string), "You need to Fish %d more Fishes to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Fishing Skill Level = 4."); format(string, sizeof(string), "You need to Fish %d more Fishes to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Fishing Skill Level = 5."); }
}
case 10://Trucker
{
new level = PlayerInfo[playerid][pTruckSkill], string[50];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Trucker Skill Level = 1."); format(string, sizeof(string), "You need to transport goods %d times to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Trucker Skill Level = 2."); format(string, sizeof(string), "You need to transport goods %d times to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Trucker Skill Level = 3."); format(string, sizeof(string), "You need to transport goods %d times to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Trucker Skill Level = 4."); format(string, sizeof(string), "You need to transport goods %d times to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Trucker Skill Level = 5."); }
}
case 11://Car Jacker
{
new level = PlayerInfo[playerid][pCarSkill], string[50];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Jacker Skill Level = 1."); format(string, sizeof(string), "You need to deliver %d more cars to level up.",51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Jacker Skill Level = 2."); format(string, sizeof(string), "You need to deliver %d more cars to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Jacker Skill Level = 3."); format(string, sizeof(string), "You need to deliver %d more cars to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Jacker Skill Level = 4."); format(string, sizeof(string), "You need to deliver %d more cars to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Car Jacker Skill Level = 5."); }
}
case 12:// Craftman
{
new level = PlayerInfo[playerid][pCraftSkill], string[50];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Craftman Skill Level = 1."); format(string, sizeof(string), "You need to craft %d more items to level up.", 51 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Craftman Skill Level = 2."); format(string, sizeof(string), "You need to craft %d more items to level up.", 101 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 101 && level <= 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Craftman Skill Level = 3."); format(string, sizeof(string), "You need to craft %d more items to level up.", 201 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 201 && level <= 400) { SendClientMessage(playerid, COLOR_YELLOW, "Your Craftman Skill Level = 4."); format(string, sizeof(string), "You need to craft %d more items to level up.", 401 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 401) { SendClientMessage(playerid, COLOR_YELLOW, "Your Craftman Skill Level = 5."); }
}
default:
{
SendClientMessage(playerid, COLOR_GREY, "Invalid skill number specified.");
}
}
return 1;
}