Little Help!
#1

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;
}
Reply
#2

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;
}
Reply
#3

ok did you read what i want to say? anywayz if you did
pawn Код:
=< 3
this means lower then 3?
Reply
#4

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
Reply
#5

Quote:
Originally Posted by Mr_Scripter
Посмотреть сообщение
ok did you read what i want to say? anywayz if you did
pawn Код:
=< 3
this means lower then 3?
Swap it round then.
Reply
#6

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
Reply
#7

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.
Reply
#8

Well my code did that?..
Reply
#9

No Jochemd you did
pawn Код:
"vip") < 1)
less then 1 so it's wrong
Thanks Cameltoe i have already learned these things but didn't knew that samp have this also
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)