![]() |
#1 |
Little Clucker
![]() Join Date: Nov 2017
Posts: 29
Reputation: 0
|
![]()
Do I have to check if variable's value is different before setting it?
Example Code:
new bool:IsSpawned[MAX_PLAYERS]; public OnPlayerSpawn(playerid) { IsSpawned[playerid] = true; return 1; } Code:
new bool:IsSpawned[MAX_PLAYERS]; public OnPlayerSpawn(playerid) { if(IsSpawned[playerid] != true) { IsSpawned[playerid] = true; } return 1; } |
![]() |
![]() |
![]() |
#2 | |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jan 2016
Location: France
Posts: 1,944
Reputation: 258
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A question about variables ? | FilesMAker | Scripting Help | 2 | 03/07/2015 12:25 AM |
1 question about Variables | AnonScripter | Scripting Help | 5 | 06/11/2013 12:30 PM |
Question about Variables | CoDeZ | Scripting Help | 8 | 02/08/2012 12:45 PM |
Question about variables... | Whizion | Scripting Help | 8 | 10/09/2011 08:42 PM |
Question about variables | blackwave | Help Archive | 3 | 07/01/2011 02:58 AM |