help script -
BanhVo - 17.01.2018
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
Re: help script -
Micko123 - 17.01.2018
Do it like this
Just open second bracket after IF
Re: help script -
Gguiz - 17.01.2018
PHP код:
((PlayerInfo[playerid][pLeader] == 1) && (PlayerInfo[playerid][pRank] = 3) || (PlayerInfo[playerid][pShopTech] >= 0))
Re: help script -
BanhVo - 17.01.2018
Quote:
Originally Posted by Micko123
Do it like this
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.
Re: help script -
jasperschellekens - 17.01.2018
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] == 1 && PlayerInfo[playerid][pRank] == 3 || PlayerInfo[playerid][pShopTech] >= 0)
Re: help script -
BanhVo - 18.01.2018
When I add to the enemy it is still faulty thanks to you for repair.
remove
Re: help script -
Sew_Sumi - 18.01.2018
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.
Re: help script -
BanhVo - 18.01.2018
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
Re: help script -
Sew_Sumi - 18.01.2018
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])
Re: help script -
BanhVo - 18.01.2018
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.