SA-MP Forums Archive
another problem[solved] - 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: another problem[solved] (/showthread.php?tid=82609)



another problem[solved] - Serediucr - 19.06.2009

i use seif's include for vehicles. i want to make a command:
pawn Код:
if (strcmp("/respray", cmdtext, true) == 0)
    {
      GetVehicleID(playerid);
    ResprayVehicle(vehicleid);
        return 1;
    }
but i get:
Код:
C:\Documents and Settings\^^\My Documents\NikeRaptor\gamemodes\raz.pwn(597) : error 017: undefined symbol "GetVehicleID"
C:\Documents and Settings\^^\My Documents\NikeRaptor\gamemodes\raz.pwn(598) : error 017: undefined symbol "vehicleid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
help?





Re: another problem - Serediucr - 19.06.2009

come on ! i think that's not hard


Re: another problem - Correlli - 19.06.2009

https://sampwiki.blast.hk/wiki/GetPlayerVehicleID

pawn Код:
if(strcmp("/respray", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
ResprayVehicle(GetPlayerVehicleID(playerid));
}
return 1;
}



Re: another problem - cloud9 - 19.06.2009

idk wat u that seif thing is but is simple like
pawn Код:
if (strcmp("/respray", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicle,1000.0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Error: You must be in a vehicle to use this command!");
}
return 1;
}



Re: another problem - Serediucr - 19.06.2009

Quote:
Originally Posted by Don Correlli
https://sampwiki.blast.hk/wiki/GetPlayerVehicleID

pawn Код:
if(strcmp("/respray", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
ResprayVehicle(GetPlayerVehicleID(playerid));
}
return 1;
}
thaaanks! it worked!
Quote:
Originally Posted by cloud9
idk wat u that seif thing is but is simple like
pawn Код:
if (strcmp("/respray", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicle,1000.0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Error: You must be in a vehicle to use this command!");
}
return 1;
}
seif's script repair car's body , not just health!


Re: another problem[solved] - MenaceX^ - 19.06.2009

Your codes have wasted brackets in my opinion.
I prefer coding in that way(fixed identiation aswell):
pawn Код:
if(!strcmp(cmdtext,"/respray",true))
{
  if(!IsPlayerInAnyVehicle(playerid))
    return SendClientMessage(playerid,color,"You have to be inside a vehicle!");
  SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
  return 1;
}