Posts: 88
Threads: 16
Joined: Oct 2017
Is there a possibility to query IF there is NO SetpVariant at this Name
For example
SetPVarInt(playerid,"Player",playerid); If this PVariant DOESNT exist THAN ....
Posts: 88
Threads: 16
Joined: Oct 2017
Quote:
Originally Posted by Sithis
|
example please
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by pulsare
example please
|
Quote:
It will still return 0 if the variable is not set, or the player does not exist.
|
Learn how to use functions... Examples won't teach you shit.
Posts: 88
Threads: 16
Joined: Oct 2017
Quote:
Originally Posted by Sew_Sumi
Learn how to use functions... Examples won't teach you shit.
|
I dont wanna get TEACHED I want the SOLUTION
Posts: 6,242
Threads: 8
Joined: Jun 2008
^^ This is why... If you're spoonfed the code/'example' you'll not learn anything, and the next hurdle you'll just be back here asking the exact same thing, for another 'example'.
Don't use Daveosss example. You don't use that as if you set Int to 0, it's valid...
https://sampwiki.blast.hk/wiki/GetPVarType
GetPVarType will give you the type of variable, of which 0 is none.
Код:
if(GetPVarType(playerid, "Player") == 0)
This is more a reason on why having people throw code to you, isn't a good idea as chances are a lot of it is incorrect, compared to the drive to get +rep.
Really hope you didn't rep Daveosss...