Jump to content

Recommended Posts

Posted

  1. CMD:spawncar(playerid, params[])

  2.     Setplayerpos(playerid,x,y,z);

    return 1;

}

am facut o comanda la misto,cum as putea sa fac ca aceasta comanda sa o poata tasta playerii pe data de ex:01.01.2018?

Cine stie?

Posted (edited)

CMD:spawncar(playerid, params[]) {
new model,string[180], color1, color2;
if(sscanf(params, "iii", model, color1, color2)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: {FFFFFF}/spawncar <Model> <color1> <color2>");
if(model < 400 || model > 611) return SendClientMessage(playerid,COLOR_WHITE, "Invalid car ID.");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicleEx(model, X,Y,Z, 0.0,  color1, color2, 300);
Gas[carid] = 100;
SetVehicleNumberPlate(carid, "AdmCar");
Carspawn[carid] = carid;
new vehicles = GetVehicleModel(carid) - 400;
format(string, sizeof(string), "AdmCmd: %s a spawnat un %s (%d). Total vehicule spawnate: %d.",GetName(playerid),aVehicleNames[vehicles],carid, CountSpawnCars());
LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
PutPlayerInVehicleEx(playerid, carid, 0);
return 1;
}
Edited by iPanter
Posted

CMD:mergedata(playerid, params[]) {
new date[3];
getdate(date[2], date[1], date[0]);
if(date[2] == 2018 && date[1] == 1 && date[0] == 1) {
face ce vrei pe data asta
} else {
SendClientMessage(playerid, -1, "Aceasta comanda poate fii folosita doar pe data de [01.01.2018]");
}
return 1;
}
Posted
CMD:mergedata(playerid, params[]) {
new date[3];
getdate(date[2], date[1], date[0]);
if(date[2] == 2018 && date[1] == 1 && date[0] == 1) {
   face ce vrei pe data asta
} else {
   SendClientMessage(playerid, -1, "Aceasta comanda poate fii folosita doar pe data de [01.01.2018]");
}
return 1;
}
CMD:mergedata(playerid, params[]) {
new an, luna, zi;
getdate(an, luna, zi);
if(an == 2018 && luna == 1 && zi == 1) {
face ce vrei pe data asta
} else {
SendClientMessage(playerid, -1, "Aceasta comanda poate fii folosita doar pe data de [01.01.2018]");
}
return 1;
}

exact ce-a spus ExcelenT.. doar ca mai explicit.

Posted
CMD:mergedata(playerid, params[]) {
new an, luna, zi;
getdate(an, luna, zi);
if(an == 2018 && luna == 1 && zi == 1) {
face ce vrei pe data asta
} else {
SendClientMessage(playerid, -1, "Aceasta comanda poate fii folosita doar pe data de [01.01.2018]");
}
return 1;
}

exact ce-a spus ExcelenT.. doar ca mai explicit.

 

Ms Mult !

CMD:mergedata(playerid, params[]) {
new date[3];
getdate(date[2], date[1], date[0]);
if(date[2] == 2018 && date[1] == 1 && date[0] == 1) {
   face ce vrei pe data asta
} else {
   SendClientMessage(playerid, -1, "Aceasta comanda poate fii folosita doar pe data de [01.01.2018]");
}
return 1;
}

Ms #RESPECT da cum fac gen mai multe date de ex:pe data de 01.01.2018 si data 02.01.2018?

Posted

CMD:mergedata(playerid, params[]) {
new an, luna, zi;
getdate(an, luna, zi);
if((an == 2018 && luna == 1) && (zi == 1 || zi == 2)) {
face ce vrei pe data asta
}
else {
SendClientMessage(playerid, -1, "Aceasta comanda poate fii folosita doar pe data de [01.01.2018] sau [02.01.2018]");
}
return 1;
}
Posted
CMD:mergedata(playerid, params[]) {
	new an, luna, zi;
	getdate(an, luna, zi);
	if((an == 2018 && luna == 1) && (zi == 1 || zi == 2)) {
		face ce vrei pe data asta
	} 
	else {
		SendClientMessage(playerid, -1, "Aceasta comanda poate fii folosita doar pe data de [01.01.2018] sau [02.01.2018]");
	}
	return 1;
}

Si daca vr sa pun mai multe zile fac :if((an == 2018 && luna == 1) && (zi == 1 || zi == 2 || zi == 3 || zi == 4)) {      ?

Posted

Si daca vr sa pun mai multe zile fac :if((an == 2018 && luna == 1) && (zi == 1 || zi == 2 || zi == 3 || zi == 4)) {      ?

if(an == 2018 && luna == 1) { 
   switch(zi) {
      case 1: {
         fa ceva daca ziua e 1 
      }
      case 2: {
         fa ceva daca ziua e 2... etc
      }
   }
}
if(an == 2018 && luna == 1) { 
   switch(zi) {
      case 1: {
         fa ceva daca ziua e 1 
      }
      case 2: {
         fa ceva daca ziua e 2... etc
      }
   }
}

sau:

if(an == 2018 && luna == 1) {
   switch(zi) {
      case 1...4: {
         fa ceva daca ziua e 1 sau 2 sau 3 sau 4
      }
      case 6: {
         fa ceva daca ziua e 6
      }
      case 7....10: {
         fa ceva daca ziua e 7 sau 8 sau 9 sau 10
      }
   }
}
Posted
if(an == 2018 && luna == 1) { 
   switch(zi) {
      case 1: {
         fa ceva daca ziua e 1 
      }
      case 2: {
         fa ceva daca ziua e 2... etc
      }
   }
}

sau:

if(an == 2018 && luna == 1) {
   switch(zi) {
      case 1...4: {
         fa ceva daca ziua e 1 sau 2 sau 3 sau 4
      }
      case 6: {
         fa ceva daca ziua e 6
      }
      case 7....10: {
         fa ceva daca ziua e 7 sau 8 sau 9 sau 10
      }
   }
}

Ms!

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   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

By using this site, you agree to our Terms of Use. 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.

moduri samp