Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //R.Sperre
- //Absperr Include by Raphael
- // Copyright by Raphael
- // Gamer-Forces.eu
- #include <a_samp>
- /*
- native AddNagelBand(playerid);
- native RemoveNagelBand(playerid);
- native RemoveAllNagelBand;
- */
- stock AddNagelBand(playerid) {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid, a);
- for(new i = 0; i < sizeof(NagelBand); i++) {
- if(NagelBand[i][nErstellt] == 0) {
- NagelBand[i][NagelBandX] = x;
- NagelBand[i][NagelBandY] = y;
- NagelBand[i][NagelBandZ] = z - 0.7;
- NagelBand[i][nErstellt] = 1;
- NagelBand[i][ID] = CreateDynamicObject(2899, x, y, z - 0.7, 0.0, 0.0, a - 90.0);
- return 1;
- }
- }
- return 0;
- }
- stock RemoveNagelBand(playerid)
- {
- for(new i = 0; i < sizeof(NagelBand); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3, NagelBand[i][NagelBandX], NagelBand[i][NagelBandY], NagelBand[i][NagelBandZ]))
- {
- if(NagelBand[i][nErstellt] == 1)
- {
- NagelBand[i][nErstellt] = 0;
- NagelBand[i][NagelBandX] = 0.0;
- NagelBand[i][NagelBandY] = 0.0;
- NagelBand[i][NagelBandZ] = 0.0;
- DestroyDynamicObject(NagelBand[i][ID]);
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "Nagelband abggebaut!");
- NagelBandErstellt[playerid] = 0;
- return 1;
- }
- }
- }
- return 0;
- }
- stock RemoveAllNagelBand() {
- for(new i = 0; i < sizeof(NagelBand); i++) {
- if(NagelBand[i][nErstellt] == 1) {
- NagelBand[i][nErstellt] = 0;
- NagelBand[i][NagelBandX] = 0.0;
- NagelBand[i][NagelBandY] = 0.0;
- NagelBand[i][NagelBandZ] = 0.0;
- DestroyDynamicObject(NagelBand[i][ID]);
- }
- }
- return 0;
- }
- //Beispiele
- /*
- if(strcmp(cmdtext, "/nagelband", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- AddNagelBand(playerid);
- SendClientMessage(playerid,ROT,"Du hast Erfolgreich ein Nagelband Erstellt.");
- }
- else
- {
- SendClientMessage(playerid,ROT,"Du bist nicht Eingeloggt!");
- }
- return 1;
- }
- if(strcmp(cmdtext, "/nagelweg", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- RemoveNagelBand(playerid);
- SendClientMessage(playerid,ROT,"Du hast Erfolgreich ein Nagelband Gelöscht.");
- }
- else
- {
- SendClientMessage(playerid,ROT,"Du bist nicht Eingeloggt!");
- }
- return 1;
- }
- if(strcmp(cmdtext, "/nagelalleweg", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- RemoveAllNagelBand();
- SendClientMessage(playerid,ROT,"Du hast Erfolgreich ein Nagelband Erstellt.");
- }
- else
- {
- SendClientMessage(playerid,ROT,"Du bist nicht Eingeloggt!");
- }
- return 1;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement