Not working... (wrong vehicle?)
#1

When i am typing my command and i am in a reefer it's telling me: Error: In order to fish you need to be in a 'Reefer'
pawn Код:
new CurrentVeh = GetPlayerVehicleID(playerid);
    if(CurrentVeh == 453)
    {
    SM(playerid,groen,"Succes: You are fishing now. In order to stop fishing simply leave the boat.");
    CurrentlyFishing[playerid] = 1;
    MaxTrysAllowedFishing[playerid] = random(24);
    CurrentlyFishing[playerid] = SetTimerEx("Fishing",2*1000,true,"i",playerid);
    }
    else {
    SM(playerid,red,"Error: In order to fish you need to be in a 'Reefer'"); }
Hope anybody can help me fix this
Reply
#2

Actually,you can't use ' ' in brackets (" ")!
It'll look like this:
SM(playerid,red,"Error: In order to fish you need to be in a Refeer"); }

- Ecko
Reply
#3

Код:
new CurrentVeh = GetPlayerVehicleID(playerid);
    if(CurrentVeh ! == 453)
    {
    SM(playerid,groen,"Succes: You are fishing now. In order to stop fishing simply leave the boat.");
    CurrentlyFishing[playerid] = 1;
    MaxTrysAllowedFishing[playerid] = random(24);
    CurrentlyFishing[playerid] = SetTimerEx("Fishing",2*1000,true,"i",playerid);
    }
    else {
    SM(playerid,red,"Error: In order to fish you need to be in a 'Reefer'"); }
Try that.
Reply
#4

pawn Код:
new CurrentVeh = GetPlayerVehicleID(playerid);
if(CurrentVeh == 453)
{
    SM(playerid,groen,"Succes: You are fishing now. In order to stop fishing simply leave the boat.");
    CurrentlyFishing[playerid] = 1;
    MaxTrysAllowedFishing[playerid] = random(24);
    CurrentlyFishing[playerid] = SetTimerEx("Fishing",2*1000,true,"i",playerid);
}
else
{
    SM(playerid,red,"Error: In order to fish you need to be in a \'Reefer'\");
}
Reply
#5

yea, you need to put \ before you put '
Reply
#6

No.. i mean, i am typing this command to start fishing. But it's telling me i ain't driving a Reefer while i am.
Reply
#7

Use: new CurrentVeh = GetVehicleModel(GetPlayerVehicleID(playerid));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)