Help ?? I think it's an error
#1

if (strcmp("/exit", cmdtext, true, 10) == 0) {


if(PlayerToPoint(15.0, playerid, 2454.717041,-1700.871582,1013.515197)) {

SendClientMessage(playerid, COLOR_FADE, "Vanzator: Scire /exit pentru a iesi!");
SetPlayerPos(playerid,2459.4539,-1690.9188,13.5453);
SetPlayerInterior(playerid, 0);
return 1;
}
}
if (strcmp("/etnobotanice", cmdtext, true, 10) == 0) {

SetPlayerCheckpoint(playerid, 2459.4539,-1690.9188,13.5453, 3.0);
SendClientMessage(playerid, COLOR_BLUELIGHTER, "Magazinul de Etnobotanice a fost plasat cu punctul rosu pe harta dumneavoastra.");
return 1;
}

is there any error on these line? cause it's givin me WARNING: LOOSE INDETITAION And command /exit is not working
Reply
#2

Loose indetitaion is not an error, is messy script. Example:

pawn Код:
if (strcmp("/etnobotanice", cmdtext, true, 10) == 0) {

SetPlayerCheckpoint(playerid, 2459.4539,-1690.9188,13.5453, 3.0);
             SendClientMessage(playerid, COLOR_BLUELIGHTER, "Example");//IN THIS LINE DO YOU GET A WARN WITH LOOSE INDETITAION
return 1;
}
But that warn dont affect the script in anything
Reply
#3

pawn Код:
// Also, about /exit command, you have to be in a range of 15 meters to send you the message, set your position and the interior.
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if( strcmp( "/exit", cmdtext, true, 5 ) == 0 ) {
        if( PlayerToPoint( 15.0, playerid, 2454.717041, -1700.871582, 1013.515197 ) ) {
            SendClientMessage( playerid, COLOR_FADE, "Vanzator: Scire /exit pentru a iesi!" );
            SetPlayerPos( playerid, 2459.4539, -1690.9188, 13.5453 );
            SetPlayerInterior( playerid, 0 );
            return 1;
        }
    }
    if( strcmp( "/etnobotanice", cmdtext, true, 13 ) == 0 ) {
        SetPlayerCheckpoint( playerid, 2459.4539, -1690.9188, 13.5453, 3.0 );
        SendClientMessage( playerid, COLOR_BLUELIGHTER, "Magazinul de Etnobotanice a fost plasat cu punctul rosu pe harta dumneavoastra." );
        return 1;
    }
    return 0;
}
Reply
#4

EDIT: Faster ^
Reply
#5

PlayerToPoint is deprecated from what the wiki says...

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#6

Try this one by Dwane
_________________
IP : 188.40.57.132:7777
Drift - Generation
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)