public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/enter, true)) { { if(IsPlayerInRangeOfPoint(playerid, 2.0, 1154.5475, -1457.7513, 15.7969)) { SetPlayerPos(playerid, -25.884498,-185.868988,1003.546875); { SendClientMessage(playerid, 0xFFFFFFFF, "You Are Not Outside A 24/7"); { return 1; }
D:\khubb2\Desktop\SAMP\Blank Server\gamemodes\PROJECT.pwn(137) : warning 217: loose indentation D:\khubb2\Desktop\SAMP\Blank Server\gamemodes\PROJECT.pwn(140) : error 030: compound statement not closed at the end of file (started at line 136) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
CMD:checktest(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, /* Replace your coordinates */))
{
//codes here
}
else
{
//else if player is not in the area
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/example"))
{
new Float:p_Pos[3]; GetPlayerPos(playerid,p_Pos[0],p_Pos[1],p_Pos[2]);
if( (p_Pos[0] == /* The X pos*/) && (p_Pos[1] == /*The Y pos*/) && (p_Pos[2] == /*The Z pos*/) )
{
//Command applys here.
}
else SendClientMessage(playerid,-1,"You're not in the correct positions!");
return 1;
}
return 0;
}
CMD:buycrack(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid,2.0, x, y, z) ) // Your coordinates
{
SendClientMessage(playerid, "You have purchased a bag of crack.");
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/enter, true)) { { if(IsPlayerInRangeOfPoint(playerid, 2.0, 1154.5475, -1457.7513, 15.7969)) { SetPlayerPos(playerid, -25.884498,-185.868988,1003.546875); { SendClientMessage(playerid, 0xFFFFFFFF, "You Are Not Outside A 24/7"); { return 1; }
D:\khubb2\Desktop\SAMP\Blank Server\gamemodes\PROJECT.pwn(137) : warning 217: loose indentation D:\khubb2\Desktop\SAMP\Blank Server\gamemodes\PROJECT.pwn(140) : error 030: compound statement not closed at the end of file (started at line 136) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/enter", true))
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1154.5475, -1457.7513, 15.7969))
{
SetPlayerPos(playerid, -25.884498,-185.868988,1003.546875);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You Are Not Outside A 24/7");
}
return 1;
}
}
pawn Code:
|