Moin Samp freunde
Habe ein Server mit den Script The GodFather.
Bin Fbi leader.
Aber /duty funtzt nicht.Der Server schreibt mir you are not a Cop.
Mach ich mich zum LSPD Leader funtzt es auch nicht:D
/duty geht nicht
- Aiden_Havering
- Geschlossen
- Erledigt
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
ohne Code können wir auch nicht helfen..
..Poste doch mal den Code zu dem Befehl "/Duty" - Danke!
-
PHP
Alles anzeigenif(strcmp(cmd, "/duty", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pMember] == 1) { if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255) { if(OnDuty[playerid]==0) { format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GivePlayerWeapon(playerid, 24, 70); GivePlayerWeapon(playerid, 3, 0); OnDuty[playerid] = 1; } else if(OnDuty[playerid]==1) { format(string, sizeof(string), "* Officer %s places his Badge and Gun in his locker.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GivePlayerWeapon(playerid, 23, 150); GivePlayerWeapon(playerid, 5, 0); OnDuty[playerid] = 0; } } else { SendClientMessage(playerid, COLOR_GRAD2, " You are not in a locker room !"); return 1; } } else if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4) { if(JobDuty[playerid] == 1) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Medic Job and will not receive calls anymore."); JobDuty[playerid] = 0; Medics -= 1; } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Medic Job and will receive calls from people in need."); JobDuty[playerid] = 1; Medics += 1; } } else if(PlayerInfo[playerid][pJob] == 7) { if(JobDuty[playerid] == 1) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Car Mechanic Job and will not receive calls anymore."); JobDuty[playerid] = 0; Mechanics -= 1; } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Car Mechanic Job and will receive calls from people in need."); JobDuty[playerid] = 1; Mechanics += 1; } } else { SendClientMessage(playerid, COLOR_GRAD1, " You are not a Cop !"); } } return 1;
Zitat -
-
Bei der Abfrage
if(PlayerInfo[playerid][pMember] == 1)
musst du natürlich auch Abfragen, ob er Leader ist!
Also so:
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
So wird es funzen
MFG,
Razor! -
Dann wenn ich COmpilen will kommt des.
PHP
Alles anzeigenC:\Users\maurice\Desktop\GFF.pwn(8512) : warning 217: loose indentation C:\Users\maurice\Desktop\GFF.pwn(8538) : warning 202: number of arguments does not match definition C:\Users\maurice\Desktop\GFF.pwn(8543) : warning 217: loose indentation C:\Users\maurice\Desktop\GFF.pwn(8813) : warning 217: loose indentation C:\Users\maurice\Desktop\GFF.pwn(8895) : warning 217: loose indentation C:\Users\maurice\Desktop\GFF.pwn(10341) : warning 217: loose indentation C:\Users\maurice\Desktop\GFF.pwn(26696) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg") Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 7 Warnings.
-
Das sind ja nur Warnings, es wird aber trotzdem gehen
"loose indentation" heißt, das die Zeilen nicht richtig eingerückt sind! Dies erzeugt Warnings!
MFG,
Razor!
-
Thx:D
Suche trotzdem ein Scripter -
breadfish.de
Hat das Thema geschlossen.