Jump to content
  • 0

Problema samp


Iulian2

Question

2 answers to this question

Recommended Posts

  • 0
CMD:givepp(playerid, params[])
{
	new id, val;
	if(sscanf(params, "ud", id)) return SendClientMessage(playerid, -1, "Syntax: /id [playerid/name] [points]");
	PlayerInfo[id][pPremiumPoint] += val;
	....
	( mesaj )
	...
	return 1;
}

ceva de genu ar trebui sa faci

Citat
Link to comment
Share on other sites

  • 0
CMD:giveallgold( playerid, params[ ] )
{
    if(PlayerInfo[playerid][pAdmin < 5) return SCM(playerid, COLOR_ERROR, "Nu ai acces la aceasta comanda");

    new lsGold;
    if( sscanf( params, "i", lsGold ) )
        return SendUsage( playerid, "/giveallgold <Amount>" );
   

    new gQuery[256];
    foreach(new i: Player)
    {
        PlayerPlaySound( i, 1057, 0.0, 0.0, 0.0 );
        PlayerInfo[ i ][ PremiumPoints] += lsGold;
        format(gQuery, sizeof(gQuery),  "* %s (%d) a dat tuturor jucatorilor %d puncte premium.",  GetName( playerid ), playerid, lsGold );
        PlayerFile_Save( i ) ; // aici poti folosi functia ta de salvare a datelor jucatorului sau:

    	format(gQuery,sizeof gQuery,"UPDATE `users` SET `PremiumPoints` = %d WHERE `Name` = '%s'", lsGold, GetName( playerid ) );
		mysql_pquery( SQL, gQuery, "", "" );
    }
    return ( 1 );
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.