Jump to content
  • 0

Problema Getgift


mefedrona

Question

Problema intalnita (descriere): Am un sistem /getgift , poti acesa comanda odata la 3 ore , dupa ce ai acesat /getgift , primesti cadoul random , dar dupa daca dai relog si intri inapoi , iara poti folosi comanda  .. nu mai trebuie sa astept 3 ore.
Ero(area / rile) / warning-(ul / urile): 0
Liniile de cod / sursa / script-ul(obligatoriu): 

CMD:saddsaasdsadsadsaddsadsadsa(playerid, params[])
{
   if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi  mai intai.");
   if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_WHITE,"{37B9C8}Please get out of the car.");
   if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1516.1532,-1655.5228,13.5392))  return SCM(playerid,COLOR_WHITE, "Nu esti la locul unde poti folosi [/getgift] (LSPD/Spawn Civil).");

   {
       {
	    	new Random = random(6);
	    	switch(Random)
	    	{
	    		case 0:
	    		{
	    			GivePlayerCash(playerid,25000);
                	Update(playerid,pCashx);
	    			SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 25.000$");
	    		}
	    		case 1:
	    		{
	  				SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 5 coins");
	   			}
	    		case 2:
	    		{
	    			PlayerInfo[playerid][pMats] += 50000;
					Update(playerid,pMatsx);
	    			SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 50000 materiale");
	    		}
	    		case 3:
	    		{
	    			PlayerInfo[playerid][pDrugs] += 10;
					new wakaname[25],str2[128];
					GetPlayerName(playerid,wakaname,sizeof(wakaname));
					format(str2,sizeof(str2),"UPDATE users SET `Drugs`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pDrugs],wakaname);
					mysql_query(SQL,str2);
	    			SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 10 grame de droguri");
	    		}
	    		case 4:
	    		{
	    			PlayerInfo[playerid][pExp] += 2;
	    			SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat 2 respect points");
	    		}
				case 5:
	    		{
	    			SendClientMessage(playerid, COLOR_WHITE, "Felicitari!Ai castigat inca 2 cadouri! [/getgift]");
	    		}
	    	}
		}
   }
   return 1;
}

Imagini / Video (optional): 0
Ati incercat sa rezolvati singur?: Nu stiu ce sa fac...

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
  • 0

Apelezi un timer care , la disconnect îţi salvează datele , iar la connect îţi dă load la date ...

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

  • 0
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.