SA-MP Forums Archive
Smail help +Rep - 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)
+--- Thread: Smail help +Rep (/showthread.php?tid=552154)

Pages: 1 2


Smail help +Rep - astanalol - 22.12.2014

Hello Guys
i Want Know How To Make This Script For Rank 2 To rank 8 can use it
PHP код:
    if(PlayerInfo[playerid][pRank] == 2
    { 
its will be like this or what cuz i try it not working in Server
PHP код:
    if(PlayerInfo[playerid][pRank] == 2.8
    { 
i want know please 2 to 8
2 /3 /4 /5 /6 /7 /8
)))))))))))))


Re: Smail help +Rep - UltraScripter - 23.12.2014

pawn Код:
if(PlayerInfo[playerid][pRank] => 2)  if(PlayerInfo[playerid][pRank] =< 8)
{

}



Re: Smail help +Rep - astanalol - 23.12.2014

This Will Use it 3 and 4 and 5 and 6 and 7 and 8 ?


Re: Smail help +Rep - UltraScripter - 23.12.2014

yeah


Re: Smail help +Rep - astanalol - 23.12.2014

Thanks


Re: Smail help +Rep - UltraScripter - 23.12.2014

happy to help bro !.


Re: Smail help +Rep - astanalol - 23.12.2014

sorry but when i make it in 2 commands differnts and compile i get error from frist one
any idea to make it 2 to 8 with not this ?
Quote:

D:\ffff\gamemodes\fast.pwn(1299) : warning 211: possibly unintended assignment
D:\ffff\gamemodes\fast.pwn(1299) : error 029: invalid expression, assumed zero
D:\ffff\gamemodes\fast.pwn(1299) : warning 215: expression has no effect
D:\ffff\gamemodes\fast.pwn(1299) : error 001: expected token: ";", but found ")"
D:\ffff\gamemodes\fast.pwn(1299) : error 029: invalid expression, assumed zero
D:\ffff\gamemodes\fast.pwn(1299) : fatal error 107: too many error messages on one line

ling 1299
Quote:

if(PlayerInfo[playerid][pRank] => 7) if(PlayerInfo[playerid][pRank] =<
all cmds
Quote:

CMDetrank(playerid, params[])
{
new str[128], ARank, lookupid;
if(PlayerInfo[playerid][pRank] => 7) if(PlayerInfo[playerid][pRank] =<
{
if(sscanf(params, "ui", lookupid, ARank)) return SendClientMessage(playerid, -1, "Usage: /setrank <PlayerID/PlayerName> <Rank>");
format(str, sizeof(str), "Admin %s (ID:%d) has setted %s (ID:%d) Rank to (%d)",GetName(playerid), playerid, GetName(lookupid), lookupid, ARank);
SendClientMessageToAll(-1, str);
PlayerInfo[lookupid][pRank] = ARank;
}
} else SendClientMessage(playerid, -1, "Sorry , you are not admin");
return 1;
}

i have CMD Again but not error


Re: Smail help +Rep - UltraScripter - 23.12.2014

pawn Code:
if(PlayerInfo[playerid][pRank] => 7) || if(PlayerInfo[playerid][pRank] =<7)



Re: Smail help +Rep - Sew_Sumi - 23.12.2014

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
happy to help bro !.
How come you claim to be UltraScripter, yet can't use && ?


Re: Smail help +Rep - 1fret - 23.12.2014

You can try this

pawn Code:
if(PlayerInfo[playerid][pRank] >= 2)



Re: Smail help +Rep - UltraScripter - 23.12.2014

but he want to make it levles 2-8 only!


Re: Smail help +Rep - astanalol - 23.12.2014

still not working
Quote:

D:\ffff\gamemodes\fast.pwn(1299) : warning 211: possibly unintended assignment
D:\ffff\gamemodes\fast.pwn(1299) : error 029: invalid expression, assumed zero
D:\ffff\gamemodes\fast.pwn(1299) : warning 215: expression has no effect
D:\ffff\gamemodes\fast.pwn(1299) : error 001: expected token: ";", but found ")"
D:\ffff\gamemodes\fast.pwn(1299) : error 029: invalid expression, assumed zero
D:\ffff\gamemodes\fast.pwn(1299) : fatal error 107: too many error messages on one line

line 1299
Quote:

if(PlayerInfo[playerid][pRank] => 7) || if(PlayerInfo[playerid][pRank] =<
{

all cmds
Quote:

CMDetrank(playerid, params[])
{
new str[128], ARank, lookupid;
if(PlayerInfo[playerid][pRank] => 7) || if(PlayerInfo[playerid][pRank] =<
{
if(sscanf(params, "ui", lookupid, ARank)) return SendClientMessage(playerid, -1, "Usage: /setrank <PlayerID/PlayerName> <Rank>");
format(str, sizeof(str), "Admin %s (ID:%d) has setted %s (ID:%d) Rank to (%d)",GetName(playerid), playerid, GetName(lookupid), lookupid, ARank);
SendClientMessageToAll(-1, str);
PlayerInfo[lookupid][pRank] = ARank;
}
} else SendClientMessage(playerid, -1, "Sorry , you are not admin");
return 1;
}




Re: Smail help +Rep - 1fret - 23.12.2014

@ ultrascripter that's what I use for a simular system and it works.

Try it


Re: Smail help +Rep - Sew_Sumi - 23.12.2014

Quote:
Originally Posted by astanalol
View Post
still not working

line 1299

all cmds
His code is wrong, that's why....

Quote:
Originally Posted by UltraScripter
View Post
but he want to make it levles 2-8 only!
Then use <=8 && >=2 then...


Sheesh... And here you are going around the forums posting up code for +reps, yet still can't use operators efficiently

Use

Code:
if(PlayerInfo[playerid][pRank] => 7 && PlayerInfo[playerid][pRank] =< 8 )
This is why simply pasting up code for +rep SUCKS...


Re: Smail help +Rep - UltraScripter - 23.12.2014

you can use || too


Re: Smail help +Rep - 1fret - 23.12.2014

Quote:
Originally Posted by astanalol
View Post
still not working

line 1299

all cmds
Quote:
Originally Posted by UltraScripter
View Post
but he want to make it levles 2-8 only!
Quote:
Originally Posted by Sew_Sumi
View Post
His code is wrong, that's why....



Then use <=8 && >=2 then...


Sheesh... And here you are going around the forums posting up code for +reps, yet still can't use operators efficiently

Use

Code:
if(PlayerInfo[playerid][pRank] => 7 && PlayerInfo[playerid][pRank] =< 8 )
This is why simply pasting up code for +rep SUCKS...
All of our suggestion a right dude , but he say it didn't work so I suggested something different.


Re: Smail help +Rep - Sew_Sumi - 23.12.2014

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
you can use || too
That's alright if you want to have bugs turn up later...


That will be true, if ANY of the 2 values are correct...

&& Requires BOTH to be true...



Do you see the difference, or you still can't see the point?

&& = AND, || = OR... BIG difference...


Re: Smail help +Rep - astanalol - 23.12.2014

new errors in it again
Quote:

D:\ffff\gamemodes\fast.pwn(1299) : warning 211: possibly unintended assignment
D:\ffff\gamemodes\fast.pwn(1299) : error 029: invalid expression, assumed zero
D:\ffff\gamemodes\fast.pwn(1299) : error 022: must be lvalue (non-constant)
D:\ffff\gamemodes\fast.pwn(1299) : error 029: invalid expression, assumed zero
D:\ffff\gamemodes\fast.pwn(1299) : fatal error 107: too many error messages on one line

Quote:

if(PlayerInfo[playerid][pRank] => 7 && PlayerInfo[playerid][pRank] =< 8 )




Re: Smail help +Rep - UltraScripter - 23.12.2014

yeah ok...


Re: Smail help +Rep - 1fret - 23.12.2014

pawn Code:
if(PlayerInfo[playerid][pRank] >= 2)
try this man. It wll only work for level two and higher.