error 017: undefined symbol \"vehicleid\"
SetVehicleHealth(vehicleid, 1000.0);
vehicleid = GetPlayerVehicleID(playerid)
public automatajavitas();{vehicleid = GetPlayerVehicleID(playerid)SetVehicleHealth(vehicleid, 1000.0);return 1;}
D:\\Szerók\\Szeró\\gamemodes\\Stunt.pwn(45) : error 055: start of function body without function headerD:\\Szerók\\Szeró\\gamemodes\\Stunt.pwn(48) : error 010: invalid function or declaration
new automatajavitastimer[MAX_PLAYERS];forward automatajavitas(playerid);public automatajavitas(playerid) { if(!IsPlayerInAnyVehicle(playerid)) return 0;new vehicleid = GetPlayerVehicleID(playerid)SetVehicleHealth(vehicleid, 1000.0);return 1;}public OnPlayerCommandText(playerid, cmdtext[]) {if(!strcmp(cmdtext,\"/automatajavitas\", true)) {if(IsPlayerInAnyVehicle(playerid))automatajavitastimer[playerid] = SetTimerEx(\"automatajavitas\", 1000, true, \"i\", playerid);return 1;}if(!strcmp(cmdtext,\"/automatajavitasoff\", true)) {KillTimer(automatajavitastimer[playerid]);return 1;}return 0;}//vagy ZCMD-velCMD:automatajavitas(playerid) {if(IsPlayerInAnyVehicle(playerid))automatajavitastimer[playerid] = SetTimerEx(\"automatajavitas\", 1000, true, \"i\", playerid);return 1;}CMD:automatajavitasoff(playerid) {KillTimer(automatajavitastimer[playerid]);return 1;}
new automatajavitastimer[MAX_PLAYERS];forward automatajavitas(playerid);public automatajavitas(playerid) { if(!IsPlayerInAnyVehicle(playerid)) return 0;new vehicleid = GetPlayerVehicleID(playerid)SetVehicleHealth(vehicleid, 1000.0);return 1;}public OnPlayerCommandText(playerid, cmdtext[]) {if(!strcmp(cmdtext,\"/automatajavitas\", true)) {if(IsPlayerInAnyVehicle(playerid))automatajavitastimer[playerid] = SetTimerEx(\"automatajavitas\", 1000, true, \"i\", playerid);return 1;}if(!strcmp(cmdtext,\"/automatajavitasoff\", true)) {KillTimer(automatajavitastimer[playerid]);return 1;}return 0;}//vagy ZCMD-velCMD:automatajavitas(playerid) {if(IsPlayerInAnyVehicle(playerid))automatajavitastimer[playerid] = SetTimerEx(\"automatajavitas\", 1000, true, \"i\", playerid);return 1;}CMD:automatajavitasoff(playerid) {KillTimer(automatajavitastimer[playerid]);return 1;} Tessék.
new vehicleid = GetPlayerVehicleID(playerid)
new vehicleid = GetPlayerVehicleID(playerid);