03.07.2009, 10:15
So I've decided to move on and try to make something else than just boring DM scripts.
Now I'm going to make a job wich (at least for now) will include one checkpoint.
You have to be in a Sweeper vehicle (574) in order to start the one-checkpoint job.
My problem is that whenever I try to type /start in-game, I get the message "Unknown Command" even though I've made it under OnPlayerCommandText.
What have I done wrong?
Now I'm going to make a job wich (at least for now) will include one checkpoint.
You have to be in a Sweeper vehicle (574) in order to start the one-checkpoint job.
pawn Код:
AddStaticVehicle(574,-80.5441,1129.1659,19.7422,207.9535,8,17); // Sweeper
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/start", cmdtext, true, 6) == 0)
{
if(IsPlayerInVehicle(playerid, 574))
SetPlayerCheckpoint(playerid, -147.1910, 1146.1820, 19.5938, 3.0);
}
return 0;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
return 1;
}
What have I done wrong?