SA-MP Forums Archive
Not working... (wrong vehicle?) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Not working... (wrong vehicle?) (/showthread.php?tid=186113)



Not working... (wrong vehicle?) - Seven. - 27.10.2010

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


Re: Not working... (wrong vehicle?) - .::: Ecko :::. - 27.10.2010

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


Re: Not working... (wrong vehicle?) - Hash [NL-RP] - 27.10.2010

Код:
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.


Re: Not working... (wrong vehicle?) - The_Moddler - 27.10.2010

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'\");
}



Re: Not working... (wrong vehicle?) - Mean - 27.10.2010

yea, you need to put \ before you put '


Re: Not working... (wrong vehicle?) - Seven. - 27.10.2010

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.


Re: Not working... (wrong vehicle?) - BMUK - 27.10.2010

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