Help a fellow Newbie Programmer..
#4

Well, what i can get from your explanation i can give this example out;

Set a playervar under the response of register dialog when player just gets registered.

PHP код:
SetPVarInt(playerid"JustRegistered"1); 
And when player spawns, check if the variable is 1 or not, if it is 1 then execute the query to insert the player's skin id into the table cause when they spawn, skin is already set so you can fetch the skin id using GetPlayerSkin(playerid); function;

PHP код:
public OnPlayerSpawn(playerid)
{
    if (
GetPVarInt(playerid"JustRegistered") == 1)
    {
        new
            
query[128];
            
        
mysql_format(mysqlquerysizeof(query), "UPDATE `...` SET `SkinID`='%d' WHERE `uniqueid`='%d'"GetPlayerSkin(playerid), uniqueidhere); // Change the unique id with yours
        
mysql_tquery(mysqlquery"""");
        
DeletePVar(playerid"JustRegistered"); // Deleting this so query won't be executed next time the player spawns
    
}
    return 
1;

I know there are more better ways than this but this is what i can think of so far.
Reply


Messages In This Thread
Help a fellow Newbie Programmer.. - by SparkyCode - 31.08.2015, 09:34
Re: Help a fellow Newbie Programmer.. - by Virtual1ty - 31.08.2015, 10:19
Re: Help a fellow Newbie Programmer.. - by SparkyCode - 31.08.2015, 14:18
Re: Help a fellow Newbie Programmer.. - by Sjn - 31.08.2015, 14:34
Re: Help a fellow Newbie Programmer.. - by xVIP3Rx - 31.08.2015, 15:05
Re: Help a fellow Newbie Programmer.. - by SparkyCode - 31.08.2015, 15:30
Re: Help a fellow Newbie Programmer.. - by xVIP3Rx - 31.08.2015, 15:40
Re: Help a fellow Newbie Programmer.. - by SparkyCode - 31.08.2015, 21:52
Re: Help a fellow Newbie Programmer.. - by xVIP3Rx - 31.08.2015, 23:52

Forum Jump:


Users browsing this thread: 1 Guest(s)