-
Posts
185 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Everything posted by MrAndrei
-
Am adaugat scriptul si in GM si degeaba :|
-
Aceeasi problema am si eu.Cand ii dau compile , imi da 19 erori C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(42) : error 017: undefined symbol "MAX_PLAYERS" C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(42) : error 009: invalid array size (negative, zero or out of bounds) C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(43) : error 017: undefined symbol "MAX_PLAYERS" C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(43) : error 009: invalid array size (negative, zero or out of bounds) C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(62) : warning 219: local variable "DsPrice" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(63) : warning 219: local variable "DsModel" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(63) : error 025: function heading differs from prototype C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(64) : warning 219: local variable "DsInapoi" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(64) : error 025: function heading differs from prototype C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(65) : warning 219: local variable "DsInainte" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(65) : error 025: function heading differs from prototype C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(66) : warning 219: local variable "DsTest" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(66) : error 025: function heading differs from prototype C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(67) : warning 219: local variable "DsHeli" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(67) : error 025: function heading differs from prototype C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(68) : warning 219: local variable "DsBuy" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(68) : error 025: function heading differs from prototype C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(69) : warning 219: local variable "DsBoat" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(69) : error 025: function heading differs from prototype C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(70) : warning 219: local variable "DsBike" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(70) : error 025: function heading differs from prototype C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(71) : warning 219: local variable "DsExit" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(71) : error 025: function heading differs from prototype C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodes****.pwn(74) : error 010: invalid function or declaration C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodesRO-RP.pwn(76) : warning 219: local variable "DsPrice" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodes****.pwn(76) : error 010: invalid function or declaration C:UsersAAADesktopGameMode-uriGamemode B-ZoneB-zone RPGgamemodes****.pwn(77) : warning 219: local variable "DsPrice" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode ********gamemodes****.pwn(77) : error 010: invalid function or declaration C:UsersAAADesktopGameMode-uriGamemode ********gamemodes****.pwn(77) : error 010: invalid function or declaration C:UsersAAADesktopGameMode-uriGamemode ********gamemodes****.pwn(77 -- 79) : warning 219: local variable "DsPrice" shadows a variable at a preceding level C:UsersAAADesktopGameMode-uriGamemode ********gamemodes****.pwn(77 -- 79) : error 010: invalid function or declaration C:UsersAAADesktopGameMode-uriGamemode ********gamemodes****.pwn(77 -- 79) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 19 Errors.
-
Foloseste comanda asta: if(strcmp(cmd, "/unban", true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Tasteaza: /unban [nume jucator(COMPLET)]"); return 1; } if(PlayerInfo[playerid][pAdmin] < 1) { SCM(playerid, -1, "Nu esti autorizat sa folosesti aceasta comanda!"); return 1; } format ( string, sizeof ( string ), "Utilizatori/%s.ini", tmp); freplaceline ( string, "Banned=1n", "Banned=0n" ); GetPlayerName(playerid, sendername, sizeof(sendername)); new string2[128]; format(string2, sizeof(string2), "Utilizatorul %s a primit unban!", tmp); SCM(playerid, -1, string2); new string3[128]; format(string3, sizeof(string3), "ADMIN INFO: {FFFFFF}%s a primit unban de la administrator %s", tmp, sendername); ABroadCast(COLOR_LIGHTRED, string3, 1); UnbanLog(string3); } Insa , iti mai trebuie si un public: forward UnbanLog(string[]); public UnbanLog(string[]) { new entry[256]; format(entry, sizeof(entry), "%sn",string); new File:hFile; hFile = fopen("Loguri/unbans.log", io_append); //Verifica daca playerul X are banned , iar daca are prin comanda [/unban] acesta va fi debanat! fwrite(hFile, entry); fclose(hFile); } La publicul OnPlayerLogin adaugi : if(PlayerInfo[playerid][pBanned] == 1) { new string1[128]; format(string1, sizeof(string1), "This account was banned by an Administrator!For the request unban please visit the website!"); SCM(playerid, COLOR_LIGHTRED, string1); Kick(playerid); return 1; } //Prelueaza informatiile din ban.cfg si le trimite catre login.In cazul un care ai banned va aparea mesajul de mai sus! Sper ca te-am ajutat, astept un raspuns!
-
Am adaugat : PlayerInfo[playerid][pGiftPoint] = 0; La PayDay() sub "Paycheck" .Nu este bine ? Sunt inca incepator.
-
Sunt inca incepator in pawn. Am adaugat ce mi-ai zis tu dar am urmatoarele erori : C:UsersAAADesktopGameMode RiseGamminGgamemodesfGaming.pwn(13879) : error 017: undefined symbol "playerid" C:UsersAAADesktopGameMode RiseGamminGgamemodesfGaming.pwn(16992) : warning 209: function "OnDialogResponse" should return a value Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Error. De eroarea 209 stiu de ea.Era si inainte. Linia : 13879 PlayerInfo[playerid][pGiftPoint] = 0;
-
Problema intalnita (descriere):Timer Getgift Ero(area / rile) / warning-(ul / urile):- Liniile de cod / sursa / script-ul:- Imagini / Video (optional):- Ati incercat sa rezolvati singur?:Da.Doresc sa aflu cum creez un timer la getgift , gen , dau acum /getgift primesc cadoul iar la urmatorul payday sa pot da din nou getgift.Am incercat si singur insa nu am reusit.Am cautat si pe alte forumuri dar tot degeaba.Va multumesc. if(strcmp(cmd, "/getgift", true) == 0) { if(IsPlayerConnected(playerid)) { if(Cadou[playerid] == 0) { if(PlayerToPoint(5.0, playerid, 1126.4187,-1450.0481,15.7969)) { new cadou = random(10); if(cadou == 1) { GivePlayerCash(playerid, 50000); Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 50.000$ la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~50,000$!", 5000, 1); return 1; } if(cadou == 2) { PlayerInfo[playerid][pExp] += 4; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 4Respect Point-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~4 Respect Points!", 5000, 1); return 1; } if(cadou == 3) { PlayerInfo[playerid][pLevel] += 1; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 1 Level UP la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~Level UP!", 5000, 1); return 1; } if(cadou == 4) { PlayerInfo[playerid][pSMS] += 900; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 900 de SMS-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~900 SMS!", 5000, 1); return 1; } if(cadou == 5) { PlayerInfo[playerid][pCall] += 1500; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 1.5000 de apeluri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~1500 calls!", 5000, 1); return 1; } if(cadou == 6) { GivePlayerCash(playerid, 150000); Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 150.000$ la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~150,000$!", 5000, 1); return 1; } if(cadou == 7) { GivePlayerCash(playerid, 200000); Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 200.000$ la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~200,000$!", 5000, 1); return 1; } if(cadou == 8) { PlayerInfo[playerid][pExp] += 7; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 7 Respect Point-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~7 Respect Points!", 5000, 1); return 1; } if(cadou == 9) { PlayerInfo[playerid][pExp] += 5; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 5 Respect Point-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~5 Respect Points!", 5000, 1); return 1; } else if(cadou == 10) { PlayerInfo[playerid][pSMS] += 7000; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 7.000 de SMS-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~7000 SMS!", 5000, 1); return 1; } } else { SendClientMessage(playerid, COLOR_YELLOW,"GiftBox:Nu esti la GiftBox!"); SendClientMessage(playerid, COLOR_YELLOW,"GiftBox:Ti-a post pus un marker de culoare rosie pe mini-map.Urmeaza-l pentru a ajunge la Giftbox.!"); SetPlayerCheckpoint(playerid, 1126.4187,-1450.0481,15.7969,5.0); CP[playerid] = 700; } } else { SCM(playerid, -1, "GiftBox:Ai folosit deja aceasta comanda!"); return 1; } } return 1; }
-
Salutari SA-MP.Ro . Am creat comanda [/getgift] prin care primesti diferite lucruri , bani , rp , level etc.Insa , odata ce ai folosit aceasta comanda, nu poti sa mai dai [/getgift] . Nu este un timer , nu este nimic , de aceea , intrebarea mea este urmatoarea: Cum adaug un timer la [/getgift]. Gen , la 1-2-3 sa poti da din nou [/getgift]. Mai jos aveti comanda [/getgift]: if(strcmp(cmd, "/getgift", true) == 0) { if(IsPlayerConnected(playerid)) { if(Cadou[playerid] == 0) { if(PlayerToPoint(5.0, playerid, 1126.4187,-1450.0481,15.7969)) { new cadou = random(10); if(cadou == 1) { GivePlayerCash(playerid, 50000); Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 50.000$ la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~50,000$!", 5000, 1); return 1; } if(cadou == 2) { PlayerInfo[playerid][pExp] += 4; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 4Respect Point-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~4 Respect Points!", 5000, 1); return 1; } if(cadou == 3) { PlayerInfo[playerid][pLevel] += 1; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 1 Level UP la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~Level UP!", 5000, 1); return 1; } if(cadou == 4) { PlayerInfo[playerid][pSMS] += 900; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 900 de SMS-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~900 SMS!", 5000, 1); return 1; } if(cadou == 5) { PlayerInfo[playerid][pCall] += 1500; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 1.5000 de apeluri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~1500 calls!", 5000, 1); return 1; } if(cadou == 6) { GivePlayerCash(playerid, 150000); Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 150.000$ la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~150,000$!", 5000, 1); return 1; } if(cadou == 7) { GivePlayerCash(playerid, 200000); Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 200.000$ la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~200,000$!", 5000, 1); return 1; } if(cadou == 8) { PlayerInfo[playerid][pExp] += 7; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 7 Respect Point-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~7 Respect Points!", 5000, 1); return 1; } if(cadou == 9) { PlayerInfo[playerid][pExp] += 5; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 5 Respect Point-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~5 Respect Points!", 5000, 1); return 1; } else if(cadou == 10) { PlayerInfo[playerid][pSMS] += 7000; Cadou[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "((Giftbox: %s a castigat 7.000 de SMS-uri la getgift.))",sendername,playerid); OOCOff(COLOR_YQLMX, string); //GameTextForPlayer(playerid, "~g~7000 SMS!", 5000, 1); return 1; } } else { SendClientMessage(playerid, COLOR_YELLOW,"GiftBox:Nu esti la GiftBox!"); SendClientMessage(playerid, COLOR_YELLOW,"GiftBox:Ti-a post pus un marker de culoare rosie pe mini-map.Urmeaza-l pentru a ajunge la Giftbox.!"); SetPlayerCheckpoint(playerid, 1126.4187,-1450.0481,15.7969,5.0); CP[playerid] = 700; } } else { SCM(playerid, -1, "GiftBox:Ai folosit deja aceasta comanda!"); return 1; } } return 1; } Va multumesc pentru ajutor! O zi placuta!
-
Ineacrca sa iti dau setint si setvw in ammu nation pana merge /buygun ,este un int sau vw care strica ceva acolo.O sa iti dau eu comanda /buygin din propriul meu gamemode , insa functioneaza doar in gsls! EDIT: Incearca acum : if (strcmp(cmd, "/buygun", true) == 0) { if(IsPlayerConnected(playerid)) { if(GetPlayerMoney(playerid) < 1) { SendClientMessage(playerid, COLOR_GREY, " You dont have enough money with you !"); return 1; } new gun; new gunid[16]; new gunstring1[256]; new gunstring2[256]; new gunstring3[256]; new gunstring4[256]; new gunstring5[256]; new infostring[256]; new guncharge; new ammocharge; new location = PlayerInfo[playerid][pLocal]; if(location == 99 || location == 100 || location == 102) { if(BizzInfo[location-99][bProducts] <= 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } new mod = 100; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { format(string, sizeof(string), "USAGE: /buygun [gunname] [ammoamount]"); SendClientMessage(playerid, COLOR_GREEN,"_______________________________________"); SendClientMessage(playerid, COLOR_WHITE,"*** Guns & Ammo ***"); SendClientMessage(playerid, COLOR_GRAD2,string); format(gunstring1, 256, "Weapons: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)", GunPrice[0][0]/100*mod,GunPrice[1][0]/100*mod,GunPrice[2][0]/100*mod,GunPrice[3][0]/100*mod,GunPrice[4][0]/100*mod,GunPrice[5][0]/100*mod,GunPrice[6][0]/100*mod); SendClientMessage(playerid, COLOR_GRAD3, gunstring1); format(gunstring2, 256, "Weapons: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane", GunPrice[7][0]/100*mod,GunPrice[8][0]/100*mod,GunPrice[9][0]/100*mod,GunPrice[10][0]/100*mod,GunPrice[11][0]/100*mod,GunPrice[12][0]/100*mod); SendClientMessage(playerid, COLOR_GRAD3, gunstring2); format(gunstring3, 256, "Weapons: sdpistol ($%d) deagle ($%d) mp5 ($%d)", GunPrice[13][0]/100*mod,GunPrice[14][0]/100*mod,GunPrice[15][0]/100*mod,GunPrice[16][0]/100*mod,GunPrice[17][0]/100*mod,GunPrice[18][0]/100*mod); SendClientMessage(playerid, COLOR_GRAD3, gunstring3); format(gunstring4, 256, "Weapons: shotgun ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)", GunPrice[19][0]/100*mod,GunPrice[20][0]/100*mod,GunPrice[21][0]/100*mod,GunPrice[22][0]/100*mod,GunPrice[23][0]/100*mod,GunPrice[24][0]/100*mod); SendClientMessage(playerid, COLOR_GRAD3, gunstring4); format(gunstring5, 256, "Weapons: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)", GunPrice[25][0],GunPrice[26][0],GunPrice[27][0],GunPrice[28][0],GunPrice[29][0]); SendClientMessage(playerid, COLOR_GRAD3, gunstring5); SendClientMessage(playerid, COLOR_GREEN,"_______________________________________"); return 1; } strmid(gunid, tmp, 0, strlen(cmdtext), 255); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { format(string, sizeof(string), "USAGE: /buygun [gunname] [ammoamount]"); return 1; } new ammo = strval(tmp); if(ammo < 1 || ammo > 999) { SendClientMessage(playerid, COLOR_GREY, " Ammo ammount not lower then 1 or higher then 999 !"); return 1; } if (strcmp(gunid, "parachute", true, strlen(gunid)) == 0) { gun = 46; guncharge = GunPrice[0][0]/100*mod; ammocharge = 0; } else if (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0) { gun = 2; guncharge = GunPrice[1][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 2; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0) { gun = 3; guncharge = GunPrice[2][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 3; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0) { gun = 5; guncharge = GunPrice[4][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 5; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "shovel", true, strlen(gunid)) == 0) { gun = 6; guncharge = GunPrice[5][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 6; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0) { gun = 7; guncharge = GunPrice[6][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 7; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0) { gun = 10; guncharge = GunPrice[7][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 10; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0) { gun = 11; guncharge = GunPrice[8][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 11; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0) { gun = 12; guncharge = GunPrice[9][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 12; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0) { gun = 13; guncharge = GunPrice[10][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 13; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "flowers", true, strlen(gunid)) == 0) { gun = 14; guncharge = GunPrice[11][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 14; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "cane", true, strlen(gunid)) == 0) { gun = 15; guncharge = GunPrice[12][0]/100*mod; ammocharge = 0; //PlayerInfo[playerid][pGun1] = 15; PlayerInfo[playerid][pAmmo1] = 1; } else if (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0) { gun = 23; guncharge = GunPrice[13][0]/100*mod; ammocharge = GunPrice[25][0]*ammo; //PlayerInfo[playerid][pGun2] = 23; PlayerInfo[playerid][pAmmo2] = ammo; } else if (strcmp(gunid, "deagle", true, strlen(gunid)) == 0) { gun = 24; guncharge = GunPrice[15][0]/100*mod; ammocharge = GunPrice[25][0]*ammo; //PlayerInfo[playerid][pGun2] = 24; PlayerInfo[playerid][pAmmo2] = ammo; } else if (strcmp(gunid, "mp5", true, strlen(gunid)) == 0) { gun = 29; guncharge = GunPrice[18][0]/100*mod; ammocharge = GunPrice[27][0]*ammo; //PlayerInfo[playerid][pGun3] = 29; PlayerInfo[playerid][pAmmo3] = ammo; } else if (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0) { gun = 25; guncharge = GunPrice[19][0]/100*mod; ammocharge = GunPrice[26][0]*ammo; //PlayerInfo[playerid][pGun3] = 25; PlayerInfo[playerid][pAmmo3] = ammo; } else if (strcmp(gunid, "ak47", true, strlen(gunid)) == 0) { gun = 30; guncharge = GunPrice[22][0]/100*mod; ammocharge = GunPrice[28][0]*ammo; //PlayerInfo[playerid][pGun4] = 30; PlayerInfo[playerid][pAmmo4] = ammo; } else if (strcmp(gunid, "m4", true, strlen(gunid)) == 0) { gun = 31; guncharge = GunPrice[23][0]/100*mod; ammocharge = GunPrice[28][0]*ammo; //PlayerInfo[playerid][pGun4] = 31; PlayerInfo[playerid][pAmmo4] = ammo; } else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0) { gun = 33; guncharge = GunPrice[24][0]/100*mod; ammocharge = GunPrice[29][0]*ammo; //PlayerInfo[playerid][pGun4] = 33; PlayerInfo[playerid][pAmmo4] = ammo; } else { SendClientMessage(playerid, COLOR_GRAD6, "ShopKeeper says: I have never heard of that weapon."); return 1; } if((guncharge+ammocharge) > GetPlayerMoney(playerid)) { format(infostring, 256, " You don't have $%d !",guncharge+ammocharge); SendClientMessage(playerid, COLOR_GRAD3, infostring); return 1; } if(GetPlayerMoney(playerid) < (guncharge+ammocharge)) { SendClientMessage(playerid, COLOR_GREY, " Can't afford that !"); return 1; } new payout = guncharge + ammocharge; format(infostring, 256, "You have purchased %s with %d ammo for $%d",gunid,ammo,payout); SendClientMessage(playerid, COLOR_GRAD3, infostring); if(location == 102 && IsACop(playerid)) { } else { SafeGivePlayerMoney(playerid, - payout); } BizzInfo[location-99][bTill] += payout; ExtortionBiz(location-99, payout); BizzInfo[location-99][bProducts]--; PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); GivePlayerWeapon(playerid, gun, ammo); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s bought weapons for $%d at biz %d", sendername, payout, location-99); printf("%s", string); PayLog(string); } else { SendClientMessage(playerid, COLOR_WHITE,"You are not in a store."); return 1; } } return 1; } Aceasta comanda este din gamemode-ul meu si la mine functioneaza!Sper sa iti mearga si tie! @AlyN.
-
Dupa cum ai spus si tu , Local Interior Ammunation este 201 , modifici una din astea cu 201 , iar la gsls , daca zici ca este Local Interior 0 , pui 0 ! Incearca asa si spune-ne daca a functionat. if(location == 200 || location == 203) Deci : if(location == 201 || location == 0) Si modifici la toata comanda [/buygun] unde scrie 200 si 203 location , pui 201 respectiv 0. Incearca asa. @AlyN.
-
Descriere tutorial:Am un gamemode RPG , pe care l-am editat in proportie de 70-80% insa , gamemodeul are doar 3 sloturi de masini.Doua masini pot fi detinute de playerii nornali ce nu detin premium account , iar daca ai premium account poti avea 3 masini.Cererea mea este urmatoarea:As dorii un tutorial despre cum mai creez inca 2 sloturi de key pt masini.Aceste doua sloturi sa aiba acces la ele orice player, iar daca as vrea ca unul din ele sa fie la premium cum fac acest lucru? Am incercat sa creez singur , insa nu am reusit!Va multumesc!O zi placuta!
-
Hero , intra in ammu nation , dai stats si spune-ne LocalInt , ca sa stim ce iti modificam.Este o problema de interior , aceasta problema am avut-o si eu si am rezolvat-o cu un simplu edit al interiorului.
-
Nu cred ca ai inteles, cand un admin da aod sa apara pe radar un punct , iar el daca se misca ( adminul ) sa se miste si punctul cu el. Am inteles ce vr tu sa imi explici , dar nu este ceea ce doresc eu.
-
La linia [83] trebuie definit acel Dialog_inregistrare si lipseste ceva , o virgula ( , ) ceva. Prima data incearca: new Dialog_inregistrat
-
Foarte frumos!Multumim! Il voi folosii dar bineinteles voi mentine creditele!
-
Am revenit la comenzile [/enter] si [/exit] intampinasem un mic bug la un sistem de case!Multumesc oricum. Puteti da T/C!
-
Voi incerca,revin cu edit daca functioneaza!Multumesc! EDIT:Am adaugat ce mi-ai dat tu , insa nu functioneaza! Chiar nu stiu ce sa mai fac..Alta modalitate?
-
Am adaugat ce mi-ai dat tu la comanda [/aod] la AdminDuty==1 , insa tot nu merge.Alta modalitate , te rog ?
-
Da.Am adaugat si tot la fel.Alta modalitate?
-
Problema intalnita (descriere):Am incercat sa fac comenzile ENTER / EXIT pe tasta ENTER , insa cand apasi pe ENTER , spre exemplu la Burger , te baga in interior , dar imediat de si scoate in acelasi loc unde ai dat enter.Mentionez ca la unele factiuni / etc nu face la fel , enter-ul functioneaza corect insa exitul face ca in video-ul de mai jos. Ero(area / rile) / warning-(ul / urile):- Liniile de cod / sursa / script-ul:- Imagini / Video (optional): public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys == KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) { new vid = GetPlayerVehicleID(playerid); if(LightsSTATE == 0) { GetVehicleParamsEx(vid,engine,lights1,alarm,doors1,bonnet,boot,objective); SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors1,bonnet,boot,objective); LightsSTATE = 1; } else { GetVehicleParamsEx(vid,engine,lights1,alarm,doors1,bonnet,boot,objective); SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors1,bonnet,boot,objective); LightsSTATE = 0; } } //--------------------------*** ENTER ***----------------------------------------------- if (PlayerToPoint(2, playerid, 2229.9072,-1721.2985,13.5617))//Gym { SetPlayerPos(playerid,772.111999,-3.898649,1000.728820); SetPlayerInterior(playerid,5); GivePlayerMoney(playerid,- 500); GameTextForPlayer(playerid, "~g~Gym ~y~Los Santos~n~~r~-$500", 1000, 1); return 1; } else if (PlayerToPoint(2, playerid, 1554.9100,-1675.6428,16.1953))//LSPD { SetPlayerPos(playerid,246.5325,62.4251,1003.6406); SetPlayerInterior(playerid,6); GameTextForPlayer(playerid, "~w~Police Departament", 1000, 1); return 1; } Am revenit si cu VIDEO : Ati incercat sa rezolvati singur?:Da si nu am reusit!
-
Am acest lucru in comanda [/aod]. Uite,aceasta este comanda , eu nu vreau culoare la nume , vreau ca atunci cand tastezi [/aod] sa apara un checkpoint pe minimapa , la fel ca la checkpointurile de al un job/dmv,etc. Mai precis , sa apara un patratel ''roz'' pe mini-map , numai atunci cand tastezi [/aod].Imi cer scuze ca nu stiu chiar cum sa va explic.Sper ca ati inteles. if(!strcmp(cmdtext, "/aod", true) || !strcmp(cmdtext, "/aduty", true)) // By MrAndrei { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You need to login first !"); return 1; } new admtext[64]; if(PlayerInfo[playerid][pAdmin] == 6) { admtext = "Owner"; } else if(PlayerInfo[playerid][pAdmin] == 5) { admtext = "Co-Owner"; } else if(PlayerInfo[playerid][pAdmin] == 4) { admtext = "Moderator"; } else if(PlayerInfo[playerid][pAdmin] == 3) { admtext = "Super-Admin"; } else if(PlayerInfo[playerid][pAdmin] == 2) { admtext = "Regular Admin"; } else if(PlayerInfo[playerid][pAdmin] == 1) { admtext = "Trial Admin"; } else { admtext = "Owner"; } if(PlayerInfo[playerid][pAdmin] > 0) { if(AdminDuty[playerid] == 0) { AdminDuty[playerid] = 1; SetPlayerHealth(playerid, 99999); SetPlayerArmour(playerid, 99999); SetPlayerColor(playerid, 0xFFB9DCFF); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), " %s [ID:%d] is now on duty as an %s.Please /w him if you need help.",sendername,playerid,admtext); SendClientMessageToAll(COLOR_LIGHTRED,string); if(PlayerInfo[playerid][pAdmin] >= 5) { for(new i = 0; i < sizeof(CarInfo); i++) { SetVehicleParamsForPlayer(i,playerid,0,0); } } return 1; } else if(AdminDuty[playerid] == 1) { AdminDuty[playerid] = 0; SetPlayerArmour(playerid, 0); SetPlayerHealth(playerid, 100); SetPlayerToTeamColor(playerid); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), " %s [ID:%d] is no longer on duty as an %s.Please not /w him.", sendername,playerid,admtext); SendClientMessageToAll(COLOR_WHITE,string); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You're not the admin !"); return 1; } } return 1; }
-
Problema intalnita (descriere):Am creeat comanda /aod , insa , as dorii ca atunci cand tastezi [/aod] si te pui On Duty , sa apari cu o culoare pe mini-map.Va multumesc! Ero(area / rile) / warning-(ul / urile):- Liniile de cod / sursa / script-ul:- Imagini / Video (optional):- Ati incercat sa rezolvati singur?:Da.Nu am reusit.
-
Am spus ca sunt la un nivel mediu.
