Begging for help (Important)
#1

Ok, i was too proud and didn't want to ask tried to make it all by myself but i simple couldn't do it...

I want to prevent a player to get into some vehicles... but i get some errors,

CODE:

pawn Код:
if(gClass == CLASS_PILOT)
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
    {
    new veh, Float:x,Float:y,Float:z;
    veh = GetPlayerVehicleID(playerid);
    if(veh > 425 || 447 || 464 || 476 || 520)
    GetPlayerPos(playerid, x,y,z);
    SetPlayerPos(playerid, x,y,z+1);
    }else return SendClientMessage(playerid, red, "[ERROR]: You need to be a pilot to fly this vehicle");
    return 1;
    }
}
Errors:
pawn Код:
C:\Users\Guille\Desktop\Samp scripting\Server23\Server\gamemodes\WD.pwn(3406) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Guille\Desktop\Samp scripting\Server23\Server\gamemodes\WD.pwn(5815) : error 033: array must be indexed (variable "gClass")
C:\Users\Guille\Desktop\Samp scripting\Server23\Server\gamemodes\WD.pwn(5826) : error 010: invalid function or declaration
Line 3406: new str[300];
Line 5815: if(gClass == CLASS_SOLDIER)
Line 5826: }
}
}
Reply


Messages In This Thread
Begging for help (Important) - by Strier - 29.01.2013, 04:53
Re: Begging for help (Important) - by Bakr - 29.01.2013, 05:12
Re: Begging for help (Important) - by Babul - 29.01.2013, 05:16
Respuesta: Begging for help (Important) - by Strier - 29.01.2013, 05:21
Re: Respuesta: Begging for help (Important) - by Jewell - 29.01.2013, 05:38
Re: Begging for help (Important) - by Dark Killer - 29.01.2013, 08:48

Forum Jump:


Users browsing this thread: 1 Guest(s)