Little help - 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: Little help (
/showthread.php?tid=273868)
Little help -
Forbidden - 03.08.2011
Is there any way to get players Vehicle ,example:
You must in a Checkpoint and you vehicle must be a Infernus,if not SendClientMessage(playerid,0xFFFFFFFF,"Bla bla !");
My code:
public OnPlayerEnterCheckpoint(playerid)
{
if(CPS_IsPlayerInCheckpoint(playerid, reinigung))//using cploader
{
if(IsPlayerInRangeOfPoint(playerid,2.0,333374,-1698.459716,20.215881))
{
IsPlayerInAnyVehicle(574);
GivePlayerMoney(playerid,20);
SendClientMessage(playerid,0x939795FF,"You received 20 Euros!");
}else{
SendClientMessage(playerid,0x939795FF,"You havenґt a Sweeper!");
}
}
return 1;
}
The Problem:
If I drive with me Sweeper into the CP he says I dont have a sweeper...
Re: Little help -
Krx17 - 03.08.2011
Something like this:
pawn Код:
new vehicle = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicle) == 574)
{
//code here
}