-
Posts
3.897 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
News
Documentation
Everything posted by IstuntmanI
-
Cauta pe la OnPlayerText, e o serie de randuri, de la A la Z, if(text[0] == 'A') ... if(text[0] == 'B') ... .................... .................... if(text[0] == 'Z') ...stergi liniile astea.
-
Ma omule, citeste erorile, verifica wiki.sa-mp.com si da-ti seama ce inseamna, daca nu stii engleza nu mai incerca sa "scriptezi". Godfatherul nu este recomandat incepatorilor, incepe cu GM-uri freeroam Aici nu se cer scripturi, ci inveti sa scriptezi. Uite aici rezolvat, dar nu cred ca v-a merge prea bine: #include <a_samp> #define COLOR_GRAD1 -1 #define COLOR_GRAD2 -1 #define COLOR_GRAD3 -1 #define COLOR_GRAD4 -1 #define COLOR_GRAD5 -1 #define COLOR_GRAD6 -1 #define COLOR_GREY -1 #define COLOR_WHITE -1 #define COLOR_LIGHTRED -1 #define COLOR_SYSTEM -1 public OnPlayerCommandText(playerid, cmdtext[])//Thx to Samy { new cmd[128],idx,tmp[128],sendername[MAX_PLAYER_NAME],string[128]; new x_nr[256]; x_nr = strtok(cmdtext, idx); cmd = strtok(cmdtext, idx); if(strcmp(cmd, "/event", true) == 0) { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(playerid)) { if(IsPlayerAdmin(playerid)) { if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /event [heal,healall,gethere,giveweapon]"); return 1; } if(strcmp(x_nr,"heal",true) == 0) { for(i=0; i < GetMaxPlayers(); i++) { new Float:x,Float:y,Float:z; GetPlayerPos(i,x,y,z); if (IsPlayerInRangeOfPoint(playerid,5.0,x,y,z)) { if(IsPlayerConnected(i)) { new amount; tmp = strtok(cmdtext, idx); amount = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_SYSTEM,"USAGE: /event heal [hp]"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerHealth(i, amount); format(string, sizeof(string), "[EVENT]: %s has setted everyones near him health at %d.",sendername,amount); SendClientMessageToAll(COLOR_LIGHTRED, string); return 1; } } } } } if(strcmp(x_nr,"healall",true) == 0) { for(i=0; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { new amount; tmp = strtok(cmdtext, idx); amount = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_SYSTEM,"USAGE: /event healall [hp]"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerHealth(i, amount); format(string, sizeof(string), "[EVENT]: %s has setted everyones health at %d.",sendername,amount); SendClientMessageToAll(COLOR_LIGHTRED, string); return 1; } } } if(strcmp(x_nr,"gethere",true) == 0) { for(i=0; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X,Y,Z); GetPlayerName(playerid, sendername, sizeof(sendername)); if(GetPlayerState(i) == 2) { SetPlayerPos(i, X,Y+4,Z); } else { SetPlayerPos(i, X,Y+2,Z); } format(string, sizeof(string), "[EVENT]: %s had telported all players at him.",sendername); SendClientMessageToAll(COLOR_LIGHTRED, string); return 1; } } } if(strcmp(x_nr,"givegun",true) == 0) { for(i=0; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { new gun,ammo; tmp = strtok(cmdtext, idx); gun = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /event givegun [gunid] [ammo]"); SendClientMessage(playerid, COLOR_GRAD1, "Melee I: Golf Club (2) | Nitestick (3) | Knife (4) | Baseball Bat (5)"); SendClientMessage(playerid, COLOR_GRAD1, "Melee I: Shovel (6) | Pool Cue (7) | Katana (8) | Chainsaw (9)"); SendClientMessage(playerid, COLOR_GRAD2, "Melee II: Purple Dildo (10) | Small White Vibrator (11) | Large White Vibrator (12)"); SendClientMessage(playerid, COLOR_GRAD2, "Melee II: Silver Vibrator (13) | Flowers (14) | Cane (15)"); SendClientMessage(playerid, COLOR_GRAD3, "Pistol: 9MM (22) | Sillenced 9MM (23) | Deagle (24)"); SendClientMessage(playerid, COLOR_GRAD4, "Shotgun: Shotgun (25)"); SendClientMessage(playerid, COLOR_GRAD5, "SMG: MP5 (29)"); SendClientMessage(playerid, COLOR_GRAD6, "Assault: AK-47 (30) | M4 (31)"); SendClientMessage(playerid, COLOR_WHITE, "Rifle: Country Rifle (33) | Sniper Rifle (34)"); return 1; } if(gun == 1 || gun >= 16 && gun <= 21 || gun == 26 || gun == 27 || gun == 28 || gun == 32 || gun >= 35 && gun <= 46) { SendClientMessage(playerid, COLOR_WHITE, "The WeaponID is wrong !"); return 1; } tmp = strtok(cmdtext, idx); ammo = strval(tmp); if(ammo <1 ||ammo > 999) { SendClientMessage(playerid, COLOR_GRAD1, "dont go below 1 or above 999 bullets!"); return 1; } new ftext[50]; if(gun == 1) { ftext = "Brass Knuckles"; } else if(gun == 2) { ftext = "Golf Club"; } else if(gun == 3) { ftext = "NightStick"; } else if(gun == 4) { ftext = "Knife"; } else if(gun == 5) { ftext = "Baseball Bat"; } else if(gun == 6) { ftext = "Shovel"; } else if(gun == 7) { ftext = "Pool Cue"; } else if(gun == 8) { ftext = "Katana"; } else if(gun == 9) { ftext = "Chainsaw"; } else if(gun == 10) { ftext = "Purple Dildo"; } else if(gun == 11) { ftext = "Small White Vibrator"; } else if(gun == 12) { ftext = "Large White Vibrator"; } else if(gun == 13) { ftext = "Silver Vibrator"; } else if(gun == 14) { ftext = "Flowers"; } else if(gun == 15) { ftext = "Cane"; } else if(gun == 16) { ftext = "Grenade"; } else if(gun == 17) { ftext = "Tear Gas"; } else if(gun == 18) { ftext = "Molotov Cocktail"; } else if(gun == 22) { ftext = "9MM"; } else if(gun == 23) { ftext = "Silenced 9mm"; } else if(gun == 24) { ftext = "Desert Eagle"; } else if(gun == 25) { ftext = "Shotgun"; } else if(gun == 26) { ftext = "Sawn-off Shotgun"; } else if(gun == 27) { ftext = "Combat Shotgun"; } else if(gun == 28) { ftext = "Micro SMG"; } else if(gun == 29) { ftext = "MP5"; } else if(gun == 30) { ftext = "AK-47"; } else if(gun == 31) { ftext = "M4"; } else if(gun == 32) { ftext = "Tec9"; } else if(gun == 33) { ftext = "Country Rifle"; } else if(gun == 34) { ftext = "Sniper Rifle"; } else if(gun == 35) { ftext = "Rocket Launcher"; } else if(gun == 36) { ftext = "HS Rocket Launcher"; } else if(gun == 37) { ftext = "Flamethrower"; } else if(gun == 38) { ftext = "Minigun"; } else if(gun == 41) { ftext = "Spraycan"; } else if(gun == 42) { ftext = "Fire Extinguisher"; } else if(gun == 43) { ftext = "Camera"; } else if(gun == 44) { ftext = "Nightvision Goggle"; } else if(gun == 45) { ftext = "Thermal Goggles"; } else if(gun == 46) { ftext = "Parachutte"; } GetPlayerName(playerid, sendername, sizeof(sendername)); GivePlayerWeapon(i, gun, ammo); format(string, sizeof(string), "[EVENT]: %s has given a %s with %d ammo.",sendername,ftext,ammo); SendClientMessageToAll(COLOR_LIGHTRED, string); return 1; } } } } } return 1; } return 0; } strtok(const stringstrtok[], &index) { new length = strlen(stringstrtok); while ((index < length) && (stringstrtok[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (stringstrtok[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = stringstrtok[index]; index++; } result[index - offset] = EOS; return result; }Data viitoare posteaza aici: http://www.sa-mp.ro/forum/index.php/topic,5356.0.html daca mai e o problema de godfather. Cine l-a ajutat, putea sa faca FS macar.
-
Pe romaneste ? http://wiki.sa-mp.com/wiki/GetPlayerKeys
-
#include <a_samp> public OnPlayerCommandText(playerid, cmdtext[])//Thx to Samy { if(strcmp(cmd, "/event", true) == 0) { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(playerid)) { if(IsPlayerAdmin(playerid)) { new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /event [heal,healall,gethere,giveweapon]"); return 1; } if(strcmp(x_nr,"heal",true) == 0) { for(new i; i < GetMaxPlayers(); i++) { if (ProxDetectorS(5.0, playerid, i)) { if(IsPlayerConnected(i)) { new amount; tmp = strtok(cmdtext, idx); amount = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_SYSTEM,"USAGE: /event heal [hp]"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerHealth(i, amount); format(string, sizeof(string), "[EVENT]: %s has setted everyones near him health at %d.",sendername,amount); SendClientMessageToAll(COLOR_LIGHTRED, string); return 1; } } } } } if(strcmp(x_nr,"healall",true) == 0) { for(new i; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { new amount; tmp = strtok(cmdtext, idx); amount = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_SYSTEM,"USAGE: /event healall [hp]"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerHealth(i, amount); format(string, sizeof(string), "[EVENT]: %s has setted everyones health at %d.",sendername,amount); SendClientMessageToAll(COLOR_LIGHTRED, string); return 1; } } } if(strcmp(x_nr,"gethere",true) == 0) { for(new i; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X,Y,Z); GetPlayerName(playerid, sendername, sizeof(sendername)); if(GetPlayerState(i) == 2) { SetPlayerPos(i, X,Y+4,Z); } else { SetPlayerPos(i, X,Y+2,Z); } format(string, sizeof(string), "[EVENT]: %s had telported %d players at him.",sendername,PlayersOnline); SendClientMessageToAll(COLOR_LIGHTRED, string); return 1; } } } if(strcmp(x_nr,"givegun",true) == 0) { for(new i; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { new gun,ammo; tmp = strtok(cmdtext, idx); gun = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /event givegun [gunid] [ammo]"); SendClientMessage(playerid, COLOR_GRAD1, "Melee I: Golf Club (2) | Nitestick (3) | Knife (4) | Baseball Bat (5)"); SendClientMessage(playerid, COLOR_GRAD1, "Melee I: Shovel (6) | Pool Cue (7) | Katana (8) | Chainsaw (9)"); SendClientMessage(playerid, COLOR_GRAD2, "Melee II: Purple Dildo (10) | Small White Vibrator (11) | Large White Vibrator (12)"); SendClientMessage(playerid, COLOR_GRAD2, "Melee II: Silver Vibrator (13) | Flowers (14) | Cane (15)"); SendClientMessage(playerid, COLOR_GRAD3, "Pistol: 9MM (22) | Sillenced 9MM (23) | Deagle (24)"); SendClientMessage(playerid, COLOR_GRAD4, "Shotgun: Shotgun (25)"); SendClientMessage(playerid, COLOR_GRAD5, "SMG: MP5 (29)"); SendClientMessage(playerid, COLOR_GRAD6, "Assault: AK-47 (30) | M4 (31)"); SendClientMessage(playerid, COLOR_WHITE, "Rifle: Country Rifle (33) | Sniper Rifle (34)"); return 1; } if(gun == 1 || gun >= 16 && gun <= 21 || gun == 26 || gun == 27 || gun == 28 || gun == 32 || gun >= 35 && gun <= 46) { SendClientMessage(playerid, COLOR_WHITE, "The WeaponID is wrong !"); return 1; } tmp = strtok(cmdtext, idx); ammo = strval(tmp); if(ammo <1 ||ammo > 999) { SendClientMessage(playerid, COLOR_GRAD1, "dont go below 1 or above 999 bullets!"); return 1; } new ftext[50]; if(gun == 1) { ftext = "Brass Knuckles"; } else if(gun == 2) { ftext = "Golf Club"; } else if(gun == 3) { ftext = "NightStick"; } else if(gun == 4) { ftext = "Knife"; } else if(gun == 5) { ftext = "Baseball Bat"; } else if(gun == 6) { ftext = "Shovel"; } else if(gun == 7) { ftext = "Pool Cue"; } else if(gun == 8) { ftext = "Katana"; } else if(gun == 9) { ftext = "Chainsaw"; } else if(gun == 10) { ftext = "Purple Dildo"; } else if(gun == 11) { ftext = "Small White Vibrator"; } else if(gun == 12) { ftext = "Large White Vibrator"; } else if(gun == 13) { ftext = "Silver Vibrator"; } else if(gun == 14) { ftext = "Flowers"; } else if(gun == 15) { ftext = "Cane"; } else if(gun == 16) { ftext = "Grenade"; } else if(gun == 17) { ftext = "Tear Gas"; } else if(gun == 18) { ftext = "Molotov Cocktail"; } else if(gun == 22) { ftext = "9MM"; } else if(gun == 23) { ftext = "Silenced 9mm"; } else if(gun == 24) { ftext = "Desert Eagle"; } else if(gun == 25) { ftext = "Shotgun"; } else if(gun == 26) { ftext = "Sawn-off Shotgun"; } else if(gun == 27) { ftext = "Combat Shotgun"; } else if(gun == 28) { ftext = "Micro SMG"; } else if(gun == 29) { ftext = "MP5"; } else if(gun == 30) { ftext = "AK-47"; } else if(gun == 31) { ftext = "M4"; } else if(gun == 32) { ftext = "Tec9"; } else if(gun == 33) { ftext = "Country Rifle"; } else if(gun == 34) { ftext = "Sniper Rifle"; } else if(gun == 35) { ftext = "Rocket Launcher"; } else if(gun == 36) { ftext = "HS Rocket Launcher"; } else if(gun == 37) { ftext = "Flamethrower"; } else if(gun == 38) { ftext = "Minigun"; } else if(gun == 41) { ftext = "Spraycan"; } else if(gun == 42) { ftext = "Fire Extinguisher"; } else if(gun == 43) { ftext = "Camera"; } else if(gun == 44) { ftext = "Nightvision Goggle"; } else if(gun == 45) { ftext = "Thermal Goggles"; } else if(gun == 46) { ftext = "Parachutte"; } GetPlayerName(playerid, sendername, sizeof(sendername)); GivePlayerWeapon(i, gun, ammo); format(string, sizeof(string), "[EVENT]: %s has given a %s with %d ammo.",sendername,ftext,ammo); SendClientMessageToAll(COLOR_LIGHTRED, string); return 1; } } } } } return 1; } return 0; }l-am pus sa fie pentru adminii RCON pentru ca nu e definit PlayerInfo + trebuia sus in script #include <a_samp>
-
Asta inseamna ca ai mai definit odata X,Y si Z fa asa mai bine: function Camera(playerid, Float:Xxx, Float:Yyy, Float:Zzz, Float:A, Mul)//3531 { SetPlayerCameraLookAt(playerid, Xxx, Yyy, Z); SetPlayerCameraPos(playerid, Xxx+ (Mul * floatsin(-A, degrees)), Yyy + (Mul * floatcos(-A, degrees)), Zzz+6); }
-
nimic, e doar un program, dai "add domain", downloadezi programul, te loghezi cu contul de pe no-ip.info ... vezi tu :P
-
Schimba pluginul de pe windows pe linux. Daca in server.cfg, pe windows, ai plugins streamer pe linux trebuie sa fie plugins streamer.so asa trebuie facut la fiecare plugin, sa adaugi .so dupa nume si sa-l ai in <server/plugins> Deci daca ai mai multe pluginuri, adaugi .so dupa fiecare: Exemplu: - Pe windows este: plugins streamer Whirlpool iar pe linux este: plugins streamer.so Whirlpool.so Sper ca ai priceput.
-
Ai uitat ultimul parametru de la CreateVehicle, dupa ce e adaugat rezulta: Attach3DTextLabelToVehicle( Create3DTextLabel( "034512jan", 0xCF6F6FF, 0.0, 0.0, 0.0, 50.0, 0, 1 ), CreateVehicle(490, 1773.3469, -1688.7434, 13.5522, 89.7953, 79, 79,10), 0.0, 0.0, 2.0); poti sa schimbi cu AddStaticVehicle daca vrei sa nu se respawneze 10 - respawn time, nu trebuie pus la AddStaticVehicle EDIT: In 0.3c s-a adaugat o functie pentru numarul de inmatriculare al masinii: http://wiki.sa-mp.com/wiki/SetVehicleNumberPlate Poti face asa: SetVehicleNumberPlate(CreateVehicle(490, 1773.3469, -1688.7434, 13.5522, 89.7953, 79, 79,10), "NUMAR");
-
Topicul vechi cred ca a fost sters pentru ca trebuia postat in PROBLEME GODFATHER!
-
Specifica ce fel de flood: 1.Cu un program ceva 2.In chat ... Daca e 1 ia-ti host pe linux, acolo nu merge floodul, daca e 2 cauta un anti-spam :P
-
Posteaza erorile, cum oi vrea sa ne dam seama ? 8-| Ce naspa ai numele : ))
-
daca nu stii engleza, las-o balta LOL, de unde alba-iulia ? =)), SA are doar LV,LS si SF ... Uita-te la OnPlayerSpawn
-
Multi din noi am luat scripturi de pe forum.sa-mp.com si am invatat din ele, am invatat functie cu functie ... WIKI-ul explica destul de bine ... http://wiki.sa-mp.com/wiki/Category:Scripting_Callbacks http://wiki.sa-mp.com/wiki/Category:Scripting_Functions
-
PROBLEME GODFATHER !
-
ERROR: Doesn't exist.
-
Ce explicatie, nu s-a inteles nimic. In locul vehiculului scrii Attach3DTextLabelToVehicle( Create3DTextLabel( "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 ), CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay), 0.0, 0.0, 2.0); CreateVehicle(....); - schimbi cu vehiculul Create3DTextLabel - schimbi mesajul si culoarea Ar trebui sa mearga. Asta e tot, ti le-am bagat pe toate pe o linie ca sa nu mai scrii pe 3 linii diferite :D
-
Prea aglomerata mapa, dar ... 5/5
-
Nici asta nu cred ca e facut de tine, nu poti tu asa ceva ... 4/5
-
Merge, click aici: http://solidfiles.com/d/57ee/download/ PS: Sunt stuntman, nu stuntmen EDIT: In timp ce eu scriam, a postat vyo inaintea mea. >.<
-
Trebuie sa folosesti MTA 1.0.x. In map editor apesi F si pe sus e un buton "Locations", da click acolo si alegi.
-
18863: [img width=600]http://img834.imageshack.us/img834/5808/18863.jpg 18864: [img width=600]http://img87.imageshack.us/img87/5431/18864w.jpg Ty to Zh3r0 for photos :D
-
Nu, deoarece CreateDynamicObject este de la streamer.
-
http://team.sa-mp.com/03cR/zz1/sa-mp-0.3c-RC2-install.exe Sursa: http://forum.sa-mp.com/showthread.php?t=194031
