Caps Lock +rep -
Eliminator - 26.04.2013
Ok,
Why when i do
" /buyweapon eagle" the command works!
`But when i do this
"/buyweapon Eagle" The command don't work.
Please tell me how to make the command works on both cases
+Rep if you helped me
Re: Caps Lock +rep -
Onfroi - 26.04.2013
What command processor are you using?
Anyways you still can't give +REP, so don't be saying that in posts.
Re: Caps Lock +rep -
RVRP - 26.04.2013
You're going to want to use the Boolean ignorecase with strcmp.
https://sampwiki.blast.hk/wiki/Strcmp
That's about all I can tell you with the lack of information provided.
Re: Caps Lock +rep -
Eliminator - 26.04.2013
@Onfroi
STRCMP
@RVMP
Ye, thanks but can you teach me how please? Cuase Wiki don't really explain good..
Or where to put this
Quote:
strcmp(stringfromvariable, stringfromtextfile, true/false, strlen(stringfromvariable))
|
Re: Caps Lock +rep -
RVRP - 26.04.2013
Quote:
Originally Posted by Eliminator
@Onfroi
STRCMP
@RVMP
Ye, thanks but can you teach me how please? Cuase Wiki don't really explain good..
Or where to put this
|
If you are using strcmp, then like I said just change the 'false' to 'true' that you see on the line. If you can't find it, post the entire command here and I'll change it for you.
Re: Caps Lock +rep -
Eliminator - 26.04.2013
PHP код:
if(!strcmp("/buyweapon combat",cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0,294.9563,-38.5114,1001.5156 ))
{
SendClientMessage(playerid,0xAFAFAFAA,"You have Buyed Combat Shotgun");
GivePlayerMoney(playerid,-1000);
GivePlayerWeapon(playerid,27,100);
}
return 1;
}
Re: Caps Lock +rep -
RVRP - 26.04.2013
pawn Код:
if(!strcmp("/buyweapon combat",cmdtext, true))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0,294.9563,-38.5114,1001.5156 ))
{
SendClientMessage(playerid,0xAFAFAFAA,"You have Buyed Combat Shotgun");
GivePlayerMoney(playerid,-1000);
GivePlayerWeapon(playerid,27,100);
}
return 1;
}
Will now allow 'eagle' to be the same thing as 'EaGlE'. You will need to do this for any commands which you do NOT wish to be case sensitive.
Re: Caps Lock +rep -
tyler12 - 26.04.2013
pawn Код:
if(!strcmp("/buyweapon combat",cmdtext,true))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0,294.9563,-38.5114,1001.5156 ))
{
SendClientMessage(playerid,0xAFAFAFAA,"You have Buyed Combat Shotgun");
GivePlayerMoney(playerid,-1000);
GivePlayerWeapon(playerid,27,100);
}
return 1;
}
Re: Caps Lock +rep -
Eliminator - 26.04.2013
@RVRP
Thanks ^_^
@tyler12
Thanks,but can't give Rep,Max of the day
Re: Caps Lock +rep -
Gomuk - 27.04.2013
Okay, to avoid the Uppercase-Lowercase mistake, use the Boolean script (you will find it in WIKI) or
Avoid using Uppercase-Lowercase letters.