help script
#1

I added it to my gamemode and it generated error on line .
Код:
 if (PlayerInfo [playerid] [pLeader] == 1) && (PlayerInfo [playerid] [pRank] = 3) || PlayerInfo [playerid] [pShopTech]> = 0)
Below is the full code I made to look up and help me.
https://pastebin.com/5nrjZxUJ
Reply
#2

Do it like this
Код:
 if ((...
Just open second bracket after IF
Reply
#3

PHP код:
((PlayerInfo[playerid][pLeader] == 1) && (PlayerInfo[playerid][pRank] = 3) || (PlayerInfo[playerid][pShopTech] >= 0)) 
Reply
#4

Quote:
Originally Posted by Micko123
Посмотреть сообщение
Do it like this
Код:
 if ((...
Just open second bracket after IF
I want all of these commands to be used for Faction actions such as LSPD or SASD to do the latter, and to have many other factions. And I want all of this when using / onduty to use it.
Reply
#5

Quote:
Originally Posted by BanhVo
Посмотреть сообщение
I added it to my gamemode and it generated error on line .
Код:
 if (PlayerInfo [playerid] [pLeader] == 1) && (PlayerInfo [playerid] [pRank] = 3) || PlayerInfo [playerid] [pShopTech]> = 0)
Below is the full code I made to look up and help me.
https://pastebin.com/5nrjZxUJ
PHP код:
if(PlayerInfo[playerid][pLeader] == && PlayerInfo[playerid][pRank] == || PlayerInfo[playerid][pShopTech] >= 0
Reply
#6

When I add to the enemy it is still faulty thanks to you for repair.
remove
Reply
#7

Why is it checking if they are leader, and then if they are rank 3 alone? Some scripts for factions only test if they are leader so their 'rank' won't matter too much and that could be causing issues especially if with my code further down, the shoptech works, but the faction lineup doesn't. Check the rank of the leader if they can't get this going.

Shoptech should probably be separate as that's more an admin role...

Код:
if((PlayerInfo[playerid][pLeader] == 1 && PlayerInfo[playerid][pRank] >= 3) || PlayerInfo[playerid][pShopTech] >= 0)
This will check if they (are a Leader, and have rank greater than 3), OR if they are a shoptech.


If the code is giving you errors, then post the errors... If it's not doing what it's supposed to then say what it should be doing, and what it's actually doing so people aren't sitting here guessing.
Reply
#8

I took these two commands and copied them out and renamed them. And I want these two commands to be exclusive to faction when the new onduty is used, what do I need. It still generates this error .
remove
Reply
#9

And again, you ignore the point that I made....


POST THE ERROR!

The error will be you simply 'editting' code without knowing what you are doing.


IsACop will only check the faction, but doesn't check OnDuty, so where you have
Код:
if(IsACop(playerid))
, would end up becoming something like
Код:
if(IsACop(playerid)&&PlayerInfo[playerid][Duty])
Reply
#10

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
And again, you ignore the point that I made....


POST THE ERROR!

The error will be you simply 'editting' code without knowing what you are doing.


IsACop will only check the faction, but doesn't check OnDuty, so where you have
Код:
if(IsACop(playerid))
, would end up becoming something like
Код:
if(IsACop(playerid)&&PlayerInfo[playerid][Duty])
Because I just do not understand the implications. I've gotten past your milk and discovered it [gtime], [gautomatic] with something else.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)