#include <a_samp>
forward IsPlayerInsideVehicle(playerid, modelid);
#endif
#pragma tabsize 0
new IsPlayerInsideVehicle[ MAX_PLAYERS ];
public OnPlayerCommandText(playerid, cmdtext[])
}
if (strcmp("/grass start", cmdtext, true, 10) == 0)
{
if IsPlayerInsideVehicle(playerid, 572)=true
{
}
SetPlayerCheckpoint(playerid, 779.9626, -1259.1793, 13.5719, 3.0);
return 1;
}
else
{
SendClientMessage(playerid,0xFFFFFFAA, "You are not driving a lawnmower");
return 1;
}
return 0;
}
C:\Users\Bastian\Documents\Samp_server\gamemodes\Test.pwn(431) : warning 211: possibly unintended assignment C:\Users\Bastian\Documents\Samp_server\gamemodes\Test.pwn(431) : error 022: must be lvalue (non-constant) C:\Users\Bastian\Documents\Samp_server\gamemodes\Test.pwn(431 -- 434) : error 028: invalid subscript (not an array or too many subscripts): "true" C:\Users\Bastian\Documents\Samp_server\gamemodes\Test.pwn(445) : warning 225: unreachable code Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
Originally Posted by cοοp
Could you show me the full FS? I don't see any "true".
|
if IsPlayerInsideVehicle(playerid, 572)=true
}
if (strcmp("/grass start", cmdtext, true, 10) == 0)
{
if IsPlayerInsideVehicle(playerid, 572)*then
{
}
SetPlayerCheckpoint(playerid, 779.9626, -1259.1793, 13.5719, 3.0);
return 1;
}
else
{
SendClientMessage(playerid,0xFFFFFFAA, "You are not driving a lawnmower");
return 1;
}
return 0;
}
C:\Users\Bastian\Documents\Samp_server\gamemodes\Test.pwn(431) : warning 209: function "IsPlayerInsideVehicle" should return a value C:\Users\Bastian\Documents\Samp_server\gamemodes\Test.pwn(445) : warning 225: unreachable code Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/grass", cmdtext, true, 6) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if (GetVehicleModel(vehicleid) == 572)
{
SetPlayerCheckpoint(playerid, 779.9626, -1259.1793, 13.5719, 3.0);
}
else
{
SendClientMessage(playerid,0xE60000FF, "You Must Be Driving A Lawnmower To Use This Command.");
}
return 1;
}
return 0;
}
Originally Posted by Shinzei_Banzai
You mean this?
pawn Код:
|
Originally Posted by Shinzei_Banzai
Cheers that worked
|
Originally Posted by cοοp
Quote:
|
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 600);
DisablePlayerCheckpoint(playerid);
return 1;
}
Originally Posted by Shinzei_Banzai
Hihi
Now I need this command to keep spawning red markers randomly when you enter one. pawn Код:
|
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/grass", cmdtext, true, 6) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if (GetVehicleModel(vehicleid) == 572)
{
SendClientMessage(playerid,0xBBFFFFFF, "You Have Started A Lawnmower Mission.");
SetPlayerRaceCheckpoint(playerid, 2, 779.9626, -1259.1793, 13.5719, 0, 0, 0, 4.0);
}
else
{
SendClientMessage(playerid,0xE60000FF, "You Must Be Driving A Lawnmower To Use This Command.");
}
return 1;
}
return 0;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
if (GetVehicleModel(vehicleid) == 572)
{
if (PlayerToPoint(4, playerid, 779.9626, -1259.1793, 13.5719))
{
SetPlayerRaceCheckpoint(playerid, 2, X, Y, Z, 0, 0, 0, 6.0);// Set the X, Y, Z
SendClientMessage(playerid, 0xBBFFFFFF, "You Have Arived At Checkpoint 1, Go To Checkpoint 2..");
}
else if (PlayerToPoint(4, playerid, X, Y, Z))// Set the X, Y, Z
{
SetPlayerRaceCheckpoint(playerid, 2, X, Y, Z, 0, 0, 0, 6.0);// Set the X, Y, Z
SendClientMessage(playerid, 0xBBFFFFFF, "You Have Arived At Checkpoint 2, Go To Checkpoint 3..");
}
return 1;
}
return 1;
}