else
if(animban[playerid] == true)
if(animban[playerid] == true){// ha animban vanPutPlayerInVehicle(id, GetPlayerVehicleID(playerid), 2);}else{// ha nincs animban..}
#include <a_samp> #include <zcmd> #include <sscanf2> new bool: animban[MAX_PLAYERS]; if(GetPlayerHealth(playerid) > 10) { ApplyAnimation(playerid, \"SWEET\", \"Sweet_injuredloop\", 4.0, 1, 0, 0, 0, 0); animban[playerid] = true; } CMD:berak(playerid, params[]) { new id; if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, -1, \"Használat: /berak [id]\"); if(id == playerid) return SendClientMessage(playerid, -1, \"Magadat??\"); if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, \"Nem található ID.\"); else { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, \"Sofõrként nem lehet\"); if(animban[playerid] = true); else { PutPlayerInVehicle(id, GetPlayerVehicleID(playerid)); SendClientMessage(playerid, -1, \"Beraktad.\"); SendClientMessage(id, -1, \"Beraktak.\"); animban[playerid] = false; } } return 1; } Rakd bele a mentõs munkád változóját.Dupla hozzászólás automatikusan összefûzve. ( 2012. május 25. - 19:34:55 )hogy érted ne sofõrként? Úgy érti, hogy ha sofõr a játékos akkor ne tudja használni a parancsot. [/quote]Itt van de ez erorros.
#include <a_samp> #include <zcmd> #include <sscanf2> new bool: animban[MAX_PLAYERS]; if(GetPlayerHealth(playerid) > 10) { ApplyAnimation(playerid, \"SWEET\", \"Sweet_injuredloop\", 4.0, 1, 0, 0, 0, 0); animban[playerid] = true; } CMD:berak(playerid, params[]) { new id; if(sscanf(params, \"u\", id)) return SendClientMessage(playerid, -1, \"Használat: /berak [id]\"); if(id == playerid) return SendClientMessage(playerid, -1, \"Magadat??\"); if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, \"Nem található ID.\"); else { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, \"Sofõrként nem lehet\"); if(animban[playerid] = true); else { PutPlayerInVehicle(id, GetPlayerVehicleID(playerid)); SendClientMessage(playerid, -1, \"Beraktad.\"); SendClientMessage(id, -1, \"Beraktak.\"); animban[playerid] = false; } } return 1; }
hogy érted ne sofõrként?
forward Anim(playerid);public OnPlayerConnect(playerid){SetTimerEx(\"Anim\",2500,true,\"i\",playerid);}public Anim(playerid){ if(GetPlayerHealth(playerid) > 10) { ApplyAnimation(playerid, \"SWEET\", \"Sweet_injuredloop\", 4.0, 1, 0, 0, 0, 0); animban[playerid] = true; }}
forward Anim(playerid);public OnPlayerConnect(playerid){SetTimerEx(\"Anim\",2500,true,\"i\",playerid);}public Anim(playerid){ new Float:health; GetPlayerHealth(playerid,health); if(health < 10) { ApplyAnimation(playerid, \"SWEET\", \"Sweet_injuredloop\", 4.0, 1, 0, 0, 0, 0); animban[playerid] = true; }}
new Float: health;GetPlayerHealth(playerid, health);if(health > 10)