public hello(playerid)return SendClientMessage(playerid,Color,"Bla");
SetTimerEx("hello",2000,1,"i",playerid);
new var = SetTimerEx(...); KillTimer(var);
public dmvPlayerDamageTimer()
{
new Float:vhp;
GetVehicleHealth(GetPlayerVehicleID(playerid), vhp);
if(strlen(vhp) <= 700)
{
SENDMSG(playerid, 0xFFFFFF, "Your car health is now around 700");
}
if(strlen(vhp) <= 540)
{
SENDMSG(playerid, 0xFFFFFF, "Your car health is now under 540 . you will be charged for the repairings.");
GivePlayerMoney(playerid, -1000);
KillTimer(dmvPlayerDamageTimer[playerid]);
}
return 1;
}
new dmvPlayerDamageTimer;
dmvPlayerDamageTimer = SetTimerEx("DmvCarDamage", 5000, true, "i", playerid);
KillTimer(dmvPlayerDamageTimer);
(2647) : error 021: symbol already defined: "dmvPlayerDamageTimer"
(2650) : error 021: symbol already defined: "GetVehicleHealth"
(2651) : error 010: invalid function or declaration
(2653) : error 021: symbol already defined: "SENDMSG"
(2656) : error 010: invalid function or declaration
(2658) : error 021: symbol already defined: "SENDMSG"
(2662) : error 010: invalid function or declaration
(2726) : warning 203: symbol is never used: "vhp"
forward DmvPlayerDamageTimer(playerid)
{
new Float:vhp;
GetVehicleHealth(GetPlayerVehicleID(playerid), vhp);
if(vhp < 700) SendClientMessage(playerid, 0xFFFFFF, "Yourcar health is now around 700!");
else if(vhp < 540)
{
SendClientMessage(playerid, 0xFFFFFF, "Your car health is now under 540. You will be charged for the repairings.");
GivePlayerMoney(playerid, -1000);
KillTimer(dmvPlayerDamageTimer[playerid]);
}
return 1;
}
(2683) : error 021: symbol already defined: "dmvPlayerDamageTimer" (2686) : error 021: symbol already defined: "GetVehicleHealth" (2687) : error 010: invalid function or declaration (2688) : error 010: invalid function or declaration (2690) : error 021: symbol already defined: "SENDMSG" (2694) : error 010: invalid function or declaration (2766) : warning 203: symbol is never used: "vhp"
yourtimer[playerid] = SetTimerEx(...); // Please Change var and other things by yourself...
forward DmvPlayerDamageTimer(playerid); public DmvPlayerDamageTimer(playerid) { new Float:vhp; GetVehicleHealth(GetPlayerVehicleID(playerid), vhp); if(vhp < 700) SendClientMessage(playerid, 0xFFFFFF, "Yourcar health is now around 700!"); else if(vhp < 540) { SendClientMessage(playerid, 0xFFFFFF, "Your car health is now under 540. You will be charged for the repairings."); GivePlayerMoney(playerid, -1000); KillTimer(yourtimer[playerid]); // Change it Please... } return 1; }
vhp = 300;
if(vhp < 700) { //my func.. }
else if(vhp < 540) { //my func.. }
if(vhp > 540 && vhp < 700) { //my func.. }
else if(vhp < 540) { //my func.. }
if(vhp < 540) { //my func.. }
else if(vhp < 700) { //my func.. }
if(vhp < 700) { //blabla } else if(vhp <540 { //blabla }
if(vhp < 700) // True { //blabla } else if(vhp <540 // again True { //blabla }
vhp > 540 && vhp < 700
vhp > 375 && vhp < 540
#include <a_samp>
public OnFilterScriptInit() { SetTimer("test", 60, true); return 1; }
forward test();public test() {
new
vhp = random(800)+200;
if(vhp < 700)
{
printf("true vhp: %d", vhp);
}
else if(vhp < 540)
{
printf("No Callback funkcion true (else if) vhp: %d", vhp);
}
}
#include <a_samp>
public OnFilterScriptInit() { SetTimer("test", 600, true); return 1; }
forward test();public test()
{
new
vhp = random(800)+200;
if(vhp < 540)
{
printf("Your car health is now under 540. VehicleHealth: %d", vhp);
}
else if(vhp < 700)
{
printf("Your car health is now under 700. VehicleHealth: %d", vhp);
}
}
Originally Posted by BlackFoX_UD_
Код:
if(vhp < 700) // True { //blabla } else if(vhp <540 // again True { //blabla } Код:
vhp > 540 && vhp < 700 Код:
vhp > 375 && vhp < 540 |
Originally Posted by Niixie
hum?
Quote:
|