- 0
am 3 probleme si niste ajutor la un dialog
-
Similar Content
-
- 3 replies
- 145 views
-
- 0 replies
- 93 views
-
- 4 replies
- 169 views
-
- 5 replies
- 378 views
-
- 1 reply
- 248 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
anakin29
Buna ziua am si eu 3 probleme
1:cand dau /admins sau /testers numi arata nici un admin/tester on si ei sunt si on duty
CMD /admins
[pawn] if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, "|____ Los-Santos-RolePlay Administrators ____|");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[pAdmin] >= 1 && PlayerInfo[pAdmin] <= 1338 )
{
new admtext[64];
if(PlayerInfo[pAppearList] == 1)
{
if(PlayerInfo[pAdmin] == 1338) { admtext = "Administrator Principal"; }
else if(PlayerInfo[pAdmin] == 1337) { admtext = "Administrator"; }
else if(PlayerInfo[pAdmin] == 6) { admtext = "Administrator[3]"; }
else if(PlayerInfo[pAdmin] == 5) { admtext = "Administrator[2]"; }
else if(PlayerInfo[pAdmin] == 4) { admtext = "Administrator[1]"; }
else if(PlayerInfo[pAdmin] == 3) { admtext = "Global Moderator"; }
else if(PlayerInfo[pAdmin] == 2) { admtext = "Moderator"; }
else if(PlayerInfo[pAdmin] == 1) { admtext = "Asistent"; }
else { admtext = "Unknown Rank"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[pAdminDuty] == 0 && PlayerInfo[pAppearList] == 1)
{
format(string, sizeof(string), "%s - %s", admtext, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else if(PlayerInfo[pAdminDuty] == 1 && PlayerInfo[pAppearList] == 1)
{
format(string, sizeof(string), "%s - %s (On Duty)", admtext, sendername);
SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
}
}
}
}
}
return 1;
}[/pawn]
CMD /testers
[pawn] if (strcmp(cmd, "/testers", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, "|____ Los-Santos-RolePlay Testers ____|");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[pTester] >= 1 && PlayerInfo[pTester] <= 3 )
{
new admtext[64];
if(PlayerInfo[pAppearList] == 1)
{
if(PlayerInfo[pTester] == 3) { admtext = "Tester"; }
else if(PlayerInfo[pTester] == 2) { admtext = "Tester"; }
else if(PlayerInfo[pTester] == 1) { admtext = "Tester"; }
else { admtext = "Unknown Rank"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[pTesterDuty] == 0 && PlayerInfo[pAppearList] == 1)
{
format(string, sizeof(string), "%s - %s", admtext, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else if(PlayerInfo[pTesterDuty] == 1 && PlayerInfo[pAppearList] == 1)
{
format(string, sizeof(string), "%s - %s (On Duty)", admtext, sendername);
SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
}
}
}
}
}
return 1;
}[/pawn]
a doua problema este ca dupa ce dau wanted nu arata la /wanted
[pawn] if(strcmp(cmd, "/wanted", true) == 0)
{
new string2[128];
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pDBanned] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "** You are Banned From Cop Duty!");
return 1;
}
if(PlayerInfo[playerid][pDuty] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "** You aren't on Duty!");
return 1;
}
if(IsACop(playerid) || IsAFreecop(playerid))
{
new x;
SendClientMessage(playerid, COLOR_GREEN, "Current Wanted Suspects:");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(WantedLevel > 1)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string2, sizeof(string2), "%s %s: %d", string,giveplayer,WantedLevel);
x++;
if(x > 3)
{
SendClientMessage(playerid, COLOR_YELLOW, string);
x = 0;
format(string2, sizeof(string2), " ");
}
else
{
format(string2, sizeof(string2), "%s, ", string);
}
}
}
}
if(x <= 3 && x > 0)
{
string[strlen(string2)-2] = '.';
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You're not a Cop / FBI / National Guard !");
}
}//not connected
return 1;
}[/pawn]
a treia problema cand dau wanted sau primeste wanted se face numele portocaliu si nu gasesc nicaieri cum opresc asta
CMD /suspect
[pawn] if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pDuty] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You are not on Duty!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/su)spect [playerid/PartOfName] [crime discription]");
return 1;
}
if(PlayerInfo[playerid][pDBanned] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "** You are Banned From Cop Duty!");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsACop(playerid) || IsAFreecop(playerid))
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/su)spect [playerid/PartOfName] [crime text]");
return 1;
}
if(IsACop(giveplayerid))
{
if(PlayerInfo[playerid][pRank] >= 6)
{
if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 6; }
else { WantedPoints[giveplayerid]+= 2; }
SetPlayerCriminalEx(giveplayerid,playerid, result);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* Your rank must be Higher or Equal to 6 to suspect other cops");
return 1;
}
}
else if(IsAFreecop(giveplayerid))
{
if(PlayerInfo[playerid][pRank] >= 3)
{
if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 6; }
else { WantedPoints[giveplayerid]+= 2; }
SetPlayerCriminalEx(giveplayerid,playerid, result);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* Your rank must be Higher or Equal to 3 to suspect security guards");
return 1;
}
}
else
{
if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 6; }
else { WantedPoints[giveplayerid]+= 2; }
SetPlayerCriminalEx(giveplayerid,playerid, result);
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /suspect %s %s",d,m,y,h,mi,s,sendername, giveplayer, (result));
CommandLog(string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "** You can't suspect a Cop !");
}
}
}
else
{
format(string, sizeof(string), "** %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "** You are not a Cop / FBI / National Guard !");
return 1;
}
return 1;
}[/pawn]
si cu dialogul:Deci vreau sa fac un sistem de dealer prin dialog adica sa am o lista cu taote masinile asta stiu sa fac dar nu stiu sa :cand dai buy pe masina aleasa sa o puna la stats pentru a fi masina si de a putea de /v ...
DECI REPEDE nu stiu sa fac :cand dai buy pe masina aleasa din dialog sa o puna la masini personale ale playerului si sa fie pe stoc limitat adica sa poate fi cumparate doar 3 masini de genul acela (daor daca se poate cu stocul daca nu nu conteaza)
Link to comment
Share on other sites
1 answer to this question
Recommended Posts