Weiß einer von euch wie man eine safebox erstellt ???
Also das man materials safen kann und ein cop die nich mehr wegnehmen kan ???
Safebox erstellen für Drogen und Mats
- TriXxoR
- Geschlossen
- Erledigt
In 10 Minuten startet der nächtliche Backupvorgang! Es kann währenddessen (ca. 10 Minuten) zu Einschränkungen bei der Nutzung des Forums kommen
Weitere Infos findet ihr im Thema Backup des Forums
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
-
-
Würde mich auch sehr interesieren
-
/ if(strcmp(cmd,"/put",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732))
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /put [name]");
SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
if(strcmp(x_nr,"Mats",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new matss;
matss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(matss > PlayerInfo[playerid][pMats])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pMats] -= matss;
PlayerInfo[playerid][pBoxMats] += matss;
format(string, sizeof(string), " %d materials deposited!", matss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
else if(strcmp(x_nr,"Drugs",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new drugss;
drugss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(drugss > PlayerInfo[playerid][pDrugs])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pDrugs] -= drugss;
PlayerInfo[playerid][pBoxDrugs] += drugss;
format(string, sizeof(string), " %d Drugs deposited!", drugss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
return 1;
}
}//not connected
return 1;
}
if(strcmp(cmd,"/gtake",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732)) //Hier deine coords
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gtake [name]");
SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
if(strcmp(x_nr,"Mats",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new matss;
matss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(matss > PlayerInfo[playerid][pBoxMats])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pBoxMats] -= matss;
PlayerInfo[playerid][pMats] += matss;
format(string, sizeof(string), " %d materials Taken!", matss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
else if(strcmp(x_nr,"Drugs",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new drugss;
drugss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(drugss > PlayerInfo[playerid][pBoxDrugs])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pBoxDrugs] -= drugss;
PlayerInfo[playerid][pDrugs] += drugss;
format(string, sizeof(string), " %d Drugs Taken!", drugss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
return 1;
}
}//not connected
return 1;
} -
Wieso zum Teufel tust du es nicht in [pwn] -.-
Naja gut Danke. -
Wieso zum Teufel tust du es nicht in [pwn] -.-
Naja gut Danke.das hat er schon gemacht blos am ende fehlt folgendes
[
}pwn]
[/ pwn]das mit dem safe hat mich auch schon interessiert, das hab ich auf nem server gesehn, der heist irgendwas mit Reborn 2 oda so
das läuft eigendlich ganz gut xDDD -
lol auf denn server war ich auch drauf mein name war Bigsmoke
was is das 20 errors
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(1) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(3) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(5) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(8) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(9) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(11) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(12) : error 025: function heading differs from prototype
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(13) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(14) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(16) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(19) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(22) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(22) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(24) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(27) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(28) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(31) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(31) : error 021: symbol already defined: "format"
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(31) : error 010: invalid function or declaration
C:\Dokumente und Einstellungen\Administrator\Desktop\GTA SA MODS UND CARS\Gta SAMP server\filterscripts\safebox.pwn(31) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
20 Errors.
-
if(strcmp(cmd,"/put",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732))
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /put [name]");
SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
if(strcmp(x_nr,"Mats",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new matss;
matss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(matss > PlayerInfo[playerid][pMats])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pMats] -= matss;
PlayerInfo[playerid][pBoxMats] += matss;
format(string, sizeof(string), " %d materials deposited!", matss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
else if(strcmp(x_nr,"Drugs",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new drugss;
drugss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(drugss > PlayerInfo[playerid][pDrugs])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pDrugs] -= drugss;
PlayerInfo[playerid][pBoxDrugs] += drugss;
format(string, sizeof(string), " %d Drugs deposited!", drugss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
return 1;
}
}//not connected
return 1;
}
if(strcmp(cmd,"/gtake",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732)) //Hier deine coords
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gtake [name]");
SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
if(strcmp(x_nr,"Mats",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new matss;
matss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(matss > PlayerInfo[playerid][pBoxMats])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pBoxMats] -= matss;
PlayerInfo[playerid][pMats] += matss;
format(string, sizeof(string), " %d materials Taken!", matss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
else if(strcmp(x_nr,"Drugs",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new drugss;
drugss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(drugss > PlayerInfo[playerid][pBoxDrugs])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pBoxDrugs] -= drugss;
PlayerInfo[playerid][pDrugs] += drugss;
format(string, sizeof(string), " %d Drugs Taken!", drugss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
return 1;
}
}//not connected
return 1;SO is bessa !
VORSCHAU FTW!!!
-
Sry da sich das alte Thema wieder raushole, habe da aber ein kleines prob.
und war habe ich den Code genommen und ihn in meiner Game Mod unter
eingefügt
dann habe ich noch oben in meiner Gamemod
new pBoxMats;
und
new pBoxDrugs;
geäddet
ich bekomme so auch kein Error aber ich habe noch 13 Warnungen die ich nicht weg bekomme.
hier mal der text:Code
Alles anzeigenF:\gta server\gamemodes\gf.pwn(8688) : warning 213: tag mismatch F:\gta server\gamemodes\gf.pwn(8703) : warning 217: loose indentation F:\gta server\gamemodes\gf.pwn(8718) : warning 213: tag mismatch F:\gta server\gamemodes\gf.pwn(8754) : warning 213: tag mismatch F:\gta server\gamemodes\gf.pwn(8758) : warning 217: loose indentation F:\gta server\gamemodes\gf.pwn(8763) : warning 213: tag mismatch F:\gta server\gamemodes\gf.pwn(8767) : warning 213: tag mismatch F:\gta server\gamemodes\gf.pwn(8772) : warning 213: tag mismatch F:\gta server\gamemodes\gf.pwn(8778) : warning 217: loose indentation F:\gta server\gamemodes\gf.pwn(8784) : warning 213: tag mismatch F:\gta server\gamemodes\gf.pwn(8793) : warning 213: tag mismatch F:\gta server\gamemodes\gf.pwn(8797) : warning 213: tag mismatch F:\gta server\gamemodes\gf.pwn(8802) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase Header size: 6200 bytes Code size: 1146492 bytes Data size: 2211068 bytes Stack/heap size: 16384 bytes; estimated max. usage=5363 cells (21452 bytes) Total requirements: 3380144 bytes 13 Warnings.
der Fehler "tag mismatch" heißt doch das etwas in der Struktur falsch ist wenn ich mich nicht irre.
aber ich weiß einfach nicht wie ich den text weiter Strukturieren soll.
2 Warnungen habe ich schon weg bekommen und jetzt komm ich net weiter ^^.
hier mal der von mir eingefügte code
//-----------------------------------------SafeBox-----------------------------------------
if(strcmp(cmd,"/put",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732))
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /put [name]");
SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
if(strcmp(x_nr,"Mats",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new matss;
matss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(matss > PlayerInfo[playerid][pMats])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pMats] -= matss;
PlayerInfo[playerid][pBoxMats] += matss;
format(string, sizeof(string), " %d materials deposited!", matss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
else if(strcmp(x_nr,"Drugs",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new drugss;
drugss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(drugss > PlayerInfo[playerid][pDrugs])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pDrugs] -= drugss;
PlayerInfo[playerid][pBoxDrugs] += drugss;
format(string, sizeof(string), " %d Drugs deposited!", drugss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
return 1;
}
}//not connected
return 1;
}
if(strcmp(cmd,"/gtake",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(25.0,playerid,2513.334717,-1676.568726,12.541371) || PlayerToPoint(3.0,playerid,1941.511108,-1120.094360,25.473835) || PlayerToPoint(3.0,playerid,1123.634399,-2044.185425,73.426231) || PlayerToPoint(3.0,playerid,726.177185,-1441.119629,16.691856) || PlayerToPoint(3.0,playerid,2605.198730,1680.478271,9.973106) || PlayerToPoint(3.0,playerid,-35.879395, 59.165298, 2.113732)) //Hier deine coords
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Put __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gtake [name]");
SendClientMessage(playerid, COLOR_GREY, "Available names: Mats, Drugs");
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
if(strcmp(x_nr,"Mats",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new matss;
matss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]");
format(string, sizeof(string), " You Have %d Mats on your SafeBox.", PlayerInfo[playerid][pBoxMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(matss > PlayerInfo[playerid][pBoxMats])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pBoxMats] -= matss;
PlayerInfo[playerid][pMats] += matss;
format(string, sizeof(string), " %d materials Taken!", matss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
else if(strcmp(x_nr,"Drugs",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new drugss;
drugss = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]");
format(string, sizeof(string), " You Have %d Drugs on your SafeBox.", PlayerInfo[playerid][pBoxDrugs]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if(drugss > PlayerInfo[playerid][pBoxDrugs])
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!");
return 1;
}
PlayerInfo[playerid][pBoxDrugs] -= drugss;
PlayerInfo[playerid][pDrugs] += drugss;
format(string, sizeof(string), " %d Drugs Taken!", drugss);
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !");
return 1;
}
}
return 1;
}//-------------------------------------SafeBox--------------------------------------
währe nett wen mir wer helfen könnte(wollte die Safebox lieber direckt inner Gamemod und nicht im Filterscript einbauen damit ich die gespeicherten mats einfacher bei den Stats adden kann ^^)
MFG Redox
-
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(2037) : warning 235: public function lacks forward declaration (symbol "IsAVagos")
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(9982) : warning 217: loose indentation
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(9983) : warning 217: loose indentation
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(17738) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(17872) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(18041) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(18213) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(18514) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(19128) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(19822) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(20069) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(20336) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(20588) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(20638) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(20857) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(21558) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(22696) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(26758) : warning 219: local variable "x_nr" shadows a variable at a preceding level
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27427) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27429) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27431) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27434) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27435) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27441) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27443) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27446) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27451) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27454) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27455) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27460) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27462) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27465) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27471) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27473) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27476) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27481) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27484) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27485) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27490) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27492) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27495) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27501) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27504) : error 010: invalid function or declaration
C:\DOKUME~1\TriXxoR\Desktop\da\NEUERO~2\gf.pwn(27507) : error 010: invalid function or declarationCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
Das is mein error !!!
-
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(1847) : warning 235: public function lacks forward declaration (symbol "IsAVagos")
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6919) : error 017: undefined symbol "cmd"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6921) : error 017: undefined symbol "playerid"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6923) : error 017: undefined symbol "playerid"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6926) : error 017: undefined symbol "cmdtext"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6929) : error 017: undefined symbol "playerid"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6930) : error 017: undefined symbol "playerid"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6931) : error 017: undefined symbol "playerid"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6932) : error 017: undefined symbol "playerid"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6937) : error 017: undefined symbol "tmp"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6937) : error 017: undefined symbol "cmdtext"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6938) : error 017: undefined symbol "tmp"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6940) : error 017: undefined symbol "playerid"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6941) : error 017: undefined symbol "string"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6941) : error 017: undefined symbol "string"
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6941) : error 029: invalid expression, assumed zero
C:\DOKUME~1\TriXxoR\Desktop\SAMP02~1.WIN\GAMEMO~1\gf.pwn(6941) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
16 Errors.
Nun diese
-
-
bei PlayerInfo
muss das hier auch unter
pMats,
pDrugs,
pBoxMats,
pBoxDrugs, -
hatte ich doch gemacht
-
bei 26 errors klammerfehler oder?
-
Also ich bekomme keine errors.
Nur so ein Warning^^ -
Jaaaa die ganzen warnings bekomm ich auch nur wie bekomm ich se weg?!
-
ich bekomme nur das :
error 021: symbol already defined: "pDrugs"habs weg^^
-
Deluxe hast du überhaupt GF
-
bei mir funktioniert die save box ohne probleme
-
Hab da auch noch ne Frage zu..
Wen ich z.B an Safebox1 Mats rein tue und dann zu Safebox2 gehe kann ich die auch bei Safebox2 abholen?
Oder kann ich wenn ich bei Safebox1 mats rein tue nur bei Safebox1 diese Mats wieder abholen? -
JA ich habe GF !
ICh bin etwas besser inscripten geworden ich probs nochmal -