Simple script problem
#7

Quote:
Originally Posted by iggy1
Посмотреть сообщение
its
pawn Код:
(!strcmp("/breakout", cmdtext, true, 5) == 0)
the '!' is very important.
What the hell are you doing?
First of all, when you ! is the same as "is false", aka. is equal to 0

So do either
pawn Код:
(!strcmp("/breakout", cmdtext, true, 5))
or
pawn Код:
(strcmp("/breakout", cmdtext, true, 5) == 0)
Second of all, "/breakout" isn't only 5 characters. Either remove "5" or change it to the correct value:
pawn Код:
(!strcmp("/breakout", cmdtext, true, 9)) //dno if null counts, if so it's 10, not 9

EDIT: This code should work:
pawn Код:
if( !strcmp( cmdtext, "/breakout", true ))
{
    if( gTeam[playerid] != TEAM_BALLA )
        return 0;
    if( !IsPlayerInRangeOfPoint( playerid, 2.0, 234.8687, 1118.6041, 1084.9922 ))
        return 0;
    SetPlayerPos(playerid,2482.2227,-1646.2852,18.3521);
    SetPlayerInterior(playerid,0);
    return 1;
}
Reply


Messages In This Thread
Simple script problem - by nejc001 - 12.09.2010, 09:47
Re: Simple script problem - by iggy1 - 12.09.2010, 09:51
Re: Simple script problem - by thomas.. - 12.09.2010, 09:51
Re: Simple script problem - by CrucixTM - 12.09.2010, 09:55
Re: Simple script problem - by iggy1 - 12.09.2010, 09:57
Re: Simple script problem - by CrucixTM - 12.09.2010, 09:57
Re: Simple script problem - by LarzI - 12.09.2010, 10:32
Re: Simple script problem - by CrucixTM - 12.09.2010, 11:08
Re: Simple script problem - by iggy1 - 12.09.2010, 11:11
Re: Simple script problem - by iggy1 - 12.09.2010, 11:23

Forum Jump:


Users browsing this thread: 1 Guest(s)