24.09.2011, 22:06
i have probably got it totally wrong but here goes
if i type /overload i want it so that i must be in range of a place otherwise it wont work and will send the message ERROR: you are not in range of such a place
if i type /overload i want it so that i must be in range of a place otherwise it wont work and will send the message ERROR: you are not in range of such a place
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/overload"))
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1286, 836.40002441406, 4.9000000953674))
SetPlayerWantedLevel( playerid, 2 );// change to what you like
GameTextForPlayer(playerid, "~r~YOU ARE OVERLOADED~n~~g~AVOID THE POLICE", 3000, 3);//change to what you want between the ""
PlayCrimeReportForPlayer(playerid, playerid, 16);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You are not on a weigh bridge");
}
return 1;
}