Page 1 of 1
/repair & /count
Posted: 27 Jun 2008, 18:18
by [AoD]Aleksis
Kā var uztaisīt komandu /repair tā lai viņa salabotu arī mašīnas virsbūvi
ne tikai izdarītu tā lai nedegtu, es zinu ka ir jāizveido tele uz repair garāžu a tālāk kas jaliek lai atgrieztos atpakaļ tajā pašā vietā?
Un vēl kā var uztaisīt laika atskaites komandu?
Eszinu ka šīs komandas ir ļoti vajadzīgas un ka bez viņām serverī nevar iztikt. Palīdzat kāds!
Re: /repair & /count
Posted: 27 Jun 2008, 18:38
by Charls
Pasaa auksaa pie #include
Code: Select all
new Count = 5;
new CountText[5][5] ={
"~r~1",
"~r~2",
"~r~3",
"~b~4",
"~b~5"
};
forward CountDown();
pie "public OnPlayerCommandText(playerid, cmdtext[]) {" ieleic komandu
Code: Select all
if (strcmp(cmdtext, "/count", true)==0)
{
if(Count >= 5)
{
SendClientMessageToAll(COLOR_GREEN, "Countdown Started...");
CountDown();
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Sorry but countdown in progress");
return 1;
}
}
un pasaa apaksaa
Code: Select all
public CountDown(){
if (Count > 0){
GameTextForAll( CountText[Count-1], 2500, 3);
Count--;
SetTimer("CountDown", 1000, 0);
}
else{
GameTextForAll("~g~Go! Go! Go!", 2500, 3);
Count = 5;
}
return 1;}
Sitas bus countdown

ja nestradaa sitas, tad nesudzies
Re: /repair & /count
Posted: 27 Jun 2008, 18:41
by heisyournewgod
Var redzēt izkopēji no skripta

Re: /repair & /count
Posted: 27 Jun 2008, 18:44
by Charls
nju logiski

Re: /repair & /count
Posted: 27 Jun 2008, 19:06
by heisyournewgod
Da labi viņš uzināja ko vajadzēja slēdzu. 300 Posts

- Nereāls spameris esmu.
Code: Select all
if (!strcmp("/fix", cmdtext, true))
{
SetVehicleHealth(GetPlayerVehicleID(playerid), 10000);
SendClientMessage(playerid, 0x00BFFFAA, "Tu salaboji savu graustu.");
return 1;
}
Repair komandiņa.