Код:
dcmd_achs(playerid, params[])
{
#pragma unused params
if(IsPlayerConnected(playerid))
{
new
TotalList[512],
TmpAch[32];
new Achlevelz[256];
new namestring[256];
new passtring[256];
new s1[256],s2[256],s3[256],s4[256],s5[256],s6[256];
switch(PlayerInfo[playerid][Car])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Let's Take A Ride\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][House])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Settling in\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][Skin])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Brand new clothes!\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][Registered])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "The way to Los Santos\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][Drugs])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "LCD..No.What was it again?\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][Callcops])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "POPO!\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][CallEMS])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Need some medical service!\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][Arrested])
{
case 0: TmpAch = "{B7B5B7}";// Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Just like a real criminal!\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][Gotkilled])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Meeting Morgan Freeman\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][Killed])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "HEADSHOT!\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][Donator])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Premium player\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[playerid][Achlevel])
{
case 0: Achlevelz = s1;
case 1: Achlevelz = s2;
case 2: Achlevelz = s3;
case 3: Achlevelz = s4;
case 4: Achlevelz = s5;
case 5: Achlevelz = s6;
}
format(s1, sizeof(s1), "{00FFCA} Rookie");
format(s2, sizeof(s1), "{00FFA1} Citizen");
format(s3, sizeof(s1), "{85FFA1} Novice");
format(s4, sizeof(s1), "{BCFFA1} Original Achiever");
format(s5, sizeof(s1), "{97FF67} Godfather");
format(s6, sizeof(s1), "{FF6700} Ruler");
format(namestring, sizeof(namestring), "Achi level: %s",Achlevelz);
SendClientMessage(playerid, COLOR_RED, passtring);
ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_LIST, namestring, TotalList, "Back", "Back");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "You're not authorized to use this command!");
}
return 1;
}
And thats it, the things before that are not shown.
The green/grey things work perfect..
Код:
if(dialogid == 91)
{
if(response)
{
new
TotalList[512],
TmpAch[32];
new namestring[128];
switch(PlayerInfo[sl[playerid]][LB])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Categorie B License\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[sl[playerid]][LA1])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Categorie A1 License\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[sl[playerid]][LCE1])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
strins(TmpAch, "Categorie CE1 License\n", strlen(TmpAch));
strins(TotalList, TmpAch, strlen(TotalList));
switch(PlayerInfo[sl[playerid]][CTCE1])
{
case 0: TmpAch = "{B7B5B7}"; // Grijs
case 1: TmpAch = "{8BFF65}"; // Groen
}
format(namestring, sizeof(namestring), "%s",GetPlayerNameEx(sl[playerid]));
ShowPlayerDialog(sl[playerid],90,DIALOG_STYLE_LIST,namestring,TotalList,"Next","Cancel");
}
else
{
return 1;
}
return 1;
}