Little Help! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Little Help! (
/showthread.php?tid=244537)
Little Help! -
Mr_Scripter - 27.03.2011
Hey i have made a Command "Svip" for Silver Vips(level 1) which will show all the silver cmds to silver vip level 1 "Vips"
how can i make vip level 3 and 2 can use vip level 1 commands ?
pawn Код:
CMD:svip(playerid,params[])
{
if(GetPVarInt(playerid, "vip") < 1) return SendClientMessage(playerid, 0xFF0000FF, "Your not a Silver vip(level 1).");
SendClientMessage(playerid,blue,"Commands");
return 1;
}
Re: Little Help! -
Stigg - 27.03.2011
Try:
pawn Код:
CMD:svip(playerid,params[])
{
if(GetPVarInt(playerid, "vip") =< 3) return SendClientMessage(playerid, 0xFF0000FF, "Your not a Silver vip(level 1).");
SendClientMessage(playerid,blue,"Commands");
return 1;
}
Re: Little Help! -
Mr_Scripter - 27.03.2011
ok did you read what i want to say? anywayz if you did
this means lower then 3?
Re: Little Help! -
Jochemd - 27.03.2011
pawn Код:
CMD:svip(playerid,params[])
{
if(GetPVarInt(playerid, "vip") < 1) return SendClientMessage(playerid, 0xFF0000FF, "Your not a Silver vip(level 1).");
SendClientMessage(playerid,blue,"Commands");
return 1;
}
All the other people can use it now, no matter what VIP level
Re: Little Help! -
Stigg - 27.03.2011
Quote:
Originally Posted by Mr_Scripter
ok did you read what i want to say? anywayz if you did this means lower then 3?
|
Swap it round then.
Re: Little Help! -
Mr_Scripter - 27.03.2011
you guys don't understand i want vip level 3 and 2 can use vip level 1 commands so
pawn Код:
if(GetPVarInt(playerid, "vip") >= 1)
or
pawn Код:
if(GetPVarInt(playerid, "vip") >= 3)
or
pawn Код:
if(GetPVarInt(playerid, "vip") <= 1)
or
pawn Код:
if(GetPVarInt(playerid, "vip") <= 3)
So level 3 and 2 can use level 1 cmds
Re: Little Help! -
Cameltoe - 27.03.2011
pawn Код:
if(!GetPVarInt(playerid, "vip") > 0) return 0;
// Command for vips 1 - x
pawn Код:
== [ Equals ]
!= [ Is not ]
< [ Less then ]
> [ Bigger then ]
<= [ Equals or Less then ]
>= [ Equals or bigger then ]
pawn Код:
if(foo == bar) // do smthn if foo is equal to bar.
if(foo != bar) // do smthn if foo Is not equal to bar.
if(foo < bar) // do smthn if foo is less then bar.
if(foo > bar) // do smthn if foo is greater then bar.
if(foo <= bar) // do smthn if foo is equal or less then bar.
if(foo >= bar) // do smthn if foo is equal or greater then bar.
Re: Little Help! -
Jochemd - 27.03.2011
Well my code did that?..
Re: Little Help! -
Mr_Scripter - 27.03.2011
No Jochemd you did
less then 1

so it's wrong
Thanks Cameltoe i have already learned these things but didn't knew that samp have this also
Re: Little Help! -
Mr_Scripter - 27.03.2011
Well I am not vip and i can use /svip (level1) Cameltoe "vip") > 0) so members Can use it also i want only Vip's