Jump to content

Question

Posted (edited)

Comanda:

 

 if(strcmp(cmdtext, "/adutyoff", true) == 0)

 {

  if(PlayerInfo[playerid][pAdmin] >= 1)

   {

    PlayerInfo[id][pDutty] = amount;

    mysql_format(SQL, string, sizeof(string), "UPDATE users SET `Dutty`='%d' WHERE `name`='%s'", PlayerInfo[playerid][pDutty]);

       mysql_tquery(SQL,string,"","");

   {

  {

 {

 

La ce vreau ajutor: să fie fără baza de date, sa se pună direct pe 0, nu cel care executa comanda sa aleagă suma, și nu sa fie gen /adutyoff Petrica, cel care folosește comanda să ii se pună lui dutty pe 0.

Vă rog să nu faceți mișto

Edited by La Misto Te Iau Cum Vreau
Am rezolvat

12 answers to this question

Recommended Posts

  • 0
Posted (edited)

if(cmdtext === '/adutyoff') {

    if(player.admin >== 1) 

        player.duty = 0;

}

Edited by Sancky
typo
  • 0
Posted
13 minutes ago, La Misto Te Iau Cum Vreau said:

Staii, asta chiar MERGE? Sau e la mișto? 

da man, trebuie sa upgradezi pawn la versiunea 8 ca s-au adaugat mai multe si a devenit oop

  • 0
Posted (edited)
4 minutes ago, Sancky said:

da man, trebuie sa upgradezi pawn la versiunea 8 ca s-au adaugat mai multe si a devenit oop

Mda, e la mișto.. Marș drq, ai văzut și acolo, dacă doar vr sa faci mișto, mai bine numai scrie coaie

Edited by La Misto Te Iau Cum Vreau
  • 0
Posted
1 hour ago, la misto il iau pe valetin said:

Sa upgradezi pawn ? e mai grav decat credeam senzonierule.

da frt ce are

  • 0
Posted
On 9/30/2023 at 7:53 PM, La Misto Te Iau Cum Vreau said:

Mda, e la mișto.. Marș drq, ai văzut și acolo, dacă doar vr sa faci mișto, mai bine numai scrie coaie

@-=[Vyorel]=- nu mai sunt moderatori pe aici?

  • 0
Posted (edited)
stock GetName(playerid) {
	new playerName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
	return playerName;
}

CMD:aduty(playerid) {
	if(PlayerInfo[playerid][pAdmin] < 1) 
		return SendClientMessage(playerid, -1, "Nu esti autorizat sa folosesti aceasta comanda.");

	switch(PlayerInfo[playerid][pDutty])
	{
		case 0: {
			PlayerInfo[playerid][pDutty] = 1;
			va_SendClientMessageToAll(-1, "%s este acum on duty. Pentru probleme folositi comanda /report.", GetName(playerid));
		}
		case 1: {
			PlayerInfo[playerid][pDutty] = 0;
			va_SendClientMessageToAll(-1, "%s este acum off duty. ", GetName(playerid));
		}
	}

	mysql_format(SQL, string, sizeof(string), "UPDATE users SET `Dutty`='%d' WHERE `name`='%s'", PlayerInfo[playerid][pDutty], GetName(playerid));
   	mysql_tquery(SQL,string,"","");
	return 1;
}

acum pls opreste-te

Edited by Maichh
Guest
This topic is now closed to further replies.
×
×
  • 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.