Command not work! - 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)
+--- Thread: Command not work! (
/showthread.php?tid=500656)
Command not work! -
finelaq - 14.03.2014
Hi, here is my another problem

Code:
pawn Код:
CMD:teeni(playerid, cmdtext)
{
new id;
id = GetPlayerVehicleID(playerid);
if(id == 440)
{
KV[playerid] = 1; // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 1052.9093,2087.1812,10.8203, 3.0); // This creates a checkpoint at the coцrdinates: "-269.1287,2610.6057,63.2069"
SendClientMessage(playerid, 0xFFFFFFFF, "Sa alustasid kaubavedamisega! Mine laadi endale kaup peale!");
}
return 1;
}
But nothing happend when i type /teeni
Re: Command not work! -
Ardenshy - 14.03.2014
Do you want get model of vehicle or id of vehicle? I think model so try this:
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(PlayerID)) == /*Model ID*/)
{
//Something
}
And by the way, you have error in this:
pawn Код:
CMD:teeni(playerid, cmdtext)
Change this to:
pawn Код:
CMD:teeni(playerid, cmdtext[])
Re: Command not work! -
finelaq - 14.03.2014
Quote:
Originally Posted by Ardenshy
Do you want get model of vehicle or id of vehicle? I think model so try this:
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(PlayerID)) == /*Model ID*/) { //Something }
|
OMG, im so stupid!