Wysłany: 2013-12-20, 00:41
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
Witam mam taki kod i chce aby mo?na by?o go u?ywa? co 1 min. jak zrobi aby dzia?a?o
Pawn if( newkeys == KEY_SUBMISSION && ! EventPlayers [ playerid ])
{
if( IsPlayerInAnyVehicle ( playerid ) && GetPlayerVehicleSeat ( playerid ) == 0 )
{
RepairVehicle ( GetPlayerVehicleID ( playerid ));
GameTextForPlayer ( playerid , "~y~Pojazd naprawiony!" , 2000 , 5 );
PlayerPlaySound ( playerid , 1133 , 0.0 , 0.0 , 0.0 );
}
return 1 ;
}
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Wysłany: 2013-12-20, 09:47
Quis
Wszechwiedzący
Wiek: 31 Na forum: 5146 dni Posty: 464
Nick w MP: Quis
Piwa : 1110
Gdzie? na g?rze:
Kod: new submissionLastUse[MAX_PLAYERS];
No i ten kodzik zamiast tego co poda?e?:
Kod: new curTime = gettime();
if(newkeys == KEY_SUBMISSION && !EventPlayers[playerid] && (curTime-submissionLastUse[playerid]) >= 60)
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid,"~y~Pojazd naprawiony!",2000,5);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
submissionLastUse[playerid] = curTime;
}
return 1;
}
Pozdrawiam
Wysłany: 2013-12-20, 12:50
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
A jeszcze ?eby wyskakiwa? napis za "b?dziesz m?g? naprawi? za 60 sek"
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Wysłany: 2013-12-20, 16:28
Quis
Wszechwiedzący
Wiek: 31 Na forum: 5146 dni Posty: 464
Nick w MP: Quis
Piwa : 1110
Takie cosik:
Kod: new curTime = gettime();
if(newkeys == KEY_SUBMISSION && !EventPlayers[playerid])
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0)
{
if((curTime-submissionLastUse[playerid]) >= 60)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid,"~y~Pojazd naprawiony!",2000,5);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
submissionLastUse[playerid] = curTime;
}
else
SendClientMessage(playerid, 0xFF0000FF, "Musisz odczeka? 60 sekund aby m?c zn?w naprawi? pojazd.");
}
return 1;
}
Tagi: używanie :: klawisza :: (czas)
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: