#include <a_samp>#include <zcmd>#include <sscanf2>new gTeam[MAX_PLAYERS];#define TEAM_MEDICAL 1 forward Medicalmoney();public Medicalmoney(){ for(new i=0; i<MAX_PLAYERS; i++) { if(gTeam == TEAM_MEDICAL) { GivePlayerMoney(i, 15000); SendClientMessage(i, 0x99FF00AA, \"[Mentõs Fizetés]: Megkaptad a fizetésed. 15000$-t!\"); } } return 1;}public OnFilterScriptInit(){SetTimer(\"Medicalmoney\",360000, true);return 1;}public OnPlayerSpawn(playerid){ if(gTeam[playerid] == TEAM_MEDICAL) { SetPlayerPos(playerid, 1608.2279,1824.1215,10.8203); } return 1;} CMD:mento(playerid, params[]){ gTeam[playerid] = TEAM_MEDICAL; SetPlayerSkin(playerid, 274); SendClientMessage(playerid, 0xFF9900AA, \"Mostantól mentõsként dolgozol! Sok Sikert!\"); return 1;}CMD:heal(playerid, params[]){ new string[64], Pid, name[MAX_PLAYER_NAME]; if(gTeam[playerid] == TEAM_MEDICAL) { if(sscanf(params, \"u\", Pid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /heal <ID/Játékosnév>\"); SetPlayerHealth(Pid, 100); GetPlayerName(playerid,name,sizeof(name)); format(string, sizeof(string), \"Feltöltötted %s életét!\", name, string); SendClientMessage(playerid, 0x33CCFFAA, string); } else { SendClientMessage(playerid, 0xFF0000AA, \"Nem vagy mentõs!\"); } return 1;}
#include <a_samp>#include <zcmd>#include <sscanf2>new gTeam[MAX_PLAYERS];#define TEAM_MEDICAL 1 forward Medicalmoney();public Medicalmoney(){ for(new i=0; i<MAX_PLAYERS; i++) { if(gTeam == TEAM_MEDICAL) { GivePlayerMoney(i, 15000); SendClientMessage(i, 0x99FF00AA, \"[Mentõs Fizetés]: Megkaptad a fizetésed. 15000$-t!\"); } } return 1;}public OnFilterScriptInit(){SetTimer(\"Medicalmoney\",360000, true);return 1;}public OnPlayerSpawn(playerid){ if(gTeam[playerid] == TEAM_MEDICAL) { SetPlayerPos(playerid, 1608.2279,1824.1215,10.8203); } return 1;} CMD:mento(playerid, params[]){ gTeam[playerid] = TEAM_MEDICAL; SetPlayerSkin(playerid, 274); SendClientMessage(playerid, 0xFF9900AA, \"Mostantól mentõsként dolgozol! Sok Sikert!\"); return 1;}CMD:heal(playerid, params[]){ new string[64], Pid, name[MAX_PLAYER_NAME]; if(gTeam[playerid] == TEAM_MEDICAL) { if(sscanf(params, \"u\", Pid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /heal <ID/Játékosnév>\"); SetPlayerHealth(Pid, 100); GetPlayerName(playerid,name,sizeof(name)); format(string, sizeof(string), \"Feltöltötted %s életét!\", name, string); SendClientMessage(playerid, 0x33CCFFAA, string); } else { SendClientMessage(playerid, 0xFF0000AA, \"Nem vagy mentõs!\"); } return 1;} Nem teszteltem! Ha nem megy, akkor szólj, és kijavítom.
#include <a_samp>#include <zcmd>#include <sscanf2>new gTeam[MAX_PLAYERS];#define TEAM_MEDICAL 1 forward Medicalmoney();public Medicalmoney(){ for(new i=0; i<MAX_PLAYERS; i++) { if(gTeam == TEAM_MEDICAL) { GivePlayerMoney(i, 15000); SendClientMessage(i, 0x99FF00AA, \"[Mentõs Fizetés]: Megkaptad a fizetésed. 15000$-t!\"); } } return 1;}public OnFilterScriptInit(){SetTimer(\"Medicalmoney\",360000, true);return 1;}public OnPlayerSpawn(playerid){ if(gTeam[playerid] == TEAM_MEDICAL) { SetPlayerPos(playerid, 1608.2279,1824.1215,10.8203); } return 1;} CMD:mento(playerid, params[]){ gTeam[playerid] = TEAM_MEDICAL; SetPlayerSkin(playerid, 274); SendClientMessage(playerid, 0xFF9900AA, \"Mostantól mentõsként dolgozol! Sok Sikert!\"); return 1;}CMD:heal(playerid, params[]){ new string[64], Pid, name[MAX_PLAYER_NAME], Float:x, Float:y, Float:z; if(gTeam[playerid] == TEAM_MEDICAL) { if(sscanf(params, \"u\", Pid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /heal <ID/Játékosnév>\"); GetPlayerPos(playerid, x, y, z); if(!IsPlayerInRangeOfPoint(Pid, 5.0, x,y,z)) return SendClientMessage(playerid, 0xFFFFFFAA, \"Nincs a közeledben a megadott játékos!\"); SetPlayerHealth(Pid, 100); GetPlayerName(playerid,name,sizeof(name)); format(string, sizeof(string), \"Feltöltötted %s életét!\", name, string); SendClientMessage(playerid, 0x33CCFFAA, string); } else { SendClientMessage(playerid, 0xFF0000AA, \"Nem vagy mentõs!\"); } return 1;}
SendClientMessage(playerid, 0xFFFFFFAA, \"Nincs a közeledben egy játékos se!\");[/quote]Ez így hamis, mivel attól, hogy a beírt játékos id nincs ott, attól lehet, hogy más ott van a körzetben.Így helyes. SendClientMessage(playerid, 0xFFFFFFAA, \"Nincs a közeledben a játékos!\");
SendClientMessage(playerid, 0xFFFFFFAA, \"Nincs a közeledben a játékos!\");