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!
/repair & /count
Moderator: Moderatori
- [AoD]Aleksis
- Nelabojams spameris
- Posts: 3891
- Joined: 25 May 2008, 14:05
- Location: Tepat.
Re: /repair & /count
Pasaa auksaa pie #include
pie "public OnPlayerCommandText(playerid, cmdtext[]) {" ieleic komandu
un pasaa apaksaa
Sitas bus countdown
ja nestradaa sitas, tad nesudzies
Code: Select all
new Count = 5;
new CountText[5][5] ={
"~r~1",
"~r~2",
"~r~3",
"~b~4",
"~b~5"
};
forward CountDown();
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;
}
}
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;}

-
- Nelabojams spameris
- Posts: 3605
- Joined: 20 Feb 2008, 19:08
Re: /repair & /count
Var redzēt izkopēji no skripta 

-
- Nelabojams spameris
- Posts: 3605
- Joined: 20 Feb 2008, 19:08
Re: /repair & /count
Da labi viņš uzināja ko vajadzēja slēdzu. 300 Posts
- Nereāls spameris esmu.
Repair komandiņa.

Code: Select all
if (!strcmp("/fix", cmdtext, true))
{
SetVehicleHealth(GetPlayerVehicleID(playerid), 10000);
SendClientMessage(playerid, 0x00BFFFAA, "Tu salaboji savu graustu.");
return 1;
}