Jump to content

LaZ

V.I.P
  • Posts

    531
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by LaZ

  1. stock GivePlayerScore( playerid, score ) { return SetPlayerScore( playerid, GetPlayerScore( playerid ) + score ); }
  2. Ii destul de naspa sa creezi un textdraw de fiecare data cand un jucator se conecteaza.
  3. stock IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if (x > minx && x < maxx && y > miny && y < maxy) return 1; return 0; }
  4. LaZ

    [MAP] Sniper ( DM MAP )

    Ai testat ultimele doua comenzi ?
  5. Mda.. Cred ca va trebui sa stai pe wiki.sa-mp.com ceva timp. public OnPlayerCommandText( playerid, cmdtext[] ) { ... } stock strtok( const string[], &index ) { ... }
  6. Nu folosi OnPlayerUpdate, n-are rost sa verifici din milisecunda in milisecunda pozitia -> lag. Foloseste un timer de 3-5 secunde.
  7. Iti trebuie un timer sa verifici daca jucatorul ii in acea zona.
  8. new tmp[ 128 ], idx; strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; } Iti lipsesc astea. ^
  9. LaZ

    Problema PM

    Nu trebuie OnPlayerCommandText. O pui unde vrei in script.
  10. LaZ

    Problema PM

    Eu mi-am facut propria comanda /pm, folosind sscanf si zcmd, ii mult mai eficient decat strtok respectiv strcmp. CMD:pm( playerid, cmdtext[] ) { new to[ 128 ], from[ 128 ]; new sender[ MAX_PLAYER_NAME ], receiver[ MAX_PLAYER_NAME ]; if ( sscanf( cmdtext, "us", cmdtext[ 0 ], cmdtext[ 1 ] ) || ( cmdtext[ 0 ] == INVALID_PLAYER_ID ) || ( cmdtext[ 0 ] == playerid ) ) return SendClientMessage( playerid, 0xFFFFFFF, "Usage: /pm <id> <message>" ); GetPlayerName( playerid, sender, sizeof sender ); GetPlayerName( cmdtext[ 0 ], receiver, sizeof receiver ); format( from, sizeof from, "PM >> %s(ID: %i): %s", sender, playerid, cmdtext[ 1 ] ); SendClientMessage( id, 0xFFFFFFFF, from ); format( to, sizeof to, "PM >> Message sent to %s(ID: %i)", receiver, cmdtext[ 0 ] ); SendClientMessage( playerid, 0xFFFFFFFF, to ); return true; } EDIT: Chiar astazi am gasit o noua metoda mai eficienta de a lucra cu ZCMD. Observa ca nu mai folosesc variabilele pentru ID si MESSAGE, ci doar parametrul cmdtext.
  11. LaZ

    MySQL

    Recomand folosirea acestui plugin; http://forum.sa-mp.com/index.php?topic=79352.0 Pluginul din acest post are cateva bug-uri care-l fac ineficient.
  12. LaZ

    Gang Zone

    http://forum.sa-mp.com/index.php?topic=109726.0
  13. Nu chiar. Functia a fost scoasa definitiv, pentru ca avea bug-uri, in plus se poate inlocui foarte usor cu text label.
  14. Am gasit si eu o colectie aici.
  15. Esti noob. Happy ? wiki.sa-mp.com Ai grija ce faci in sectiunea Discutii Scripting. You've been warned.
  16. Nu poti sa modifici numerele de imnatriculare in 0.3.
  17. Nu este SetVehicleNumberPlate in 0.3
  18. Nu. Foloseste compiler-ul vechi cum ii.
  19. Hm.. Buna intrebare ! Doar tu ai codul sursa, de unde sa stim noi ? Vrei sa ghicim ?
  20. OnPlayerDeath - Cand jucatorul moare... playerid - victima killerid - cel care a omorat reason - cu ce l-a omorat sau cum a murit Cu ce inlocuiesti parametrii playerid, killerid, reason ? Cu ce vrei sa-i inlocuiesti ?
  21. De vrei sa schimbi pozitia unui jucator cand moare ? Ajuta foarte mult, depinde ce vrei sa faci. SendDeathMessage( killerid, playerid, reason );
  22. La inceput ai pus BanEx, dupa aia SendClientMessageToAll. Nu va aparea numele jucatorului, pentru ca acesta a fost deja deconectat de functia BanEx si va aparea ceva de genu " was banned, reason: Minigun". Incearca sa pui BanEx dupa SendClientMessageToAll.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.