Jump to content
  • 0

Am rezolvat. Cer T/C


La Misto Te Iau Cum Vreau

Question

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
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0
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
Link to comment
Share on other sites

  • 0
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
Link to comment
Share on other sites

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.