- 0
Problema erori complier
-
Similar Content
-
- 6 replies
- 256 views
-
- 1 answer
- 410 views
-
- 4 replies
- 223 views
-
- 3 answers
- 395 views
-
- 3 replies
- 188 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
FANEX
Buna,Am o problema la un script de gm, o functie de speedboost!Sper sa puteti sa ma ajutati careva...E primul meu topic(sau ma rog 'post')
Iata Problema:
BUG: OnPlayerKeyStateChange' Errorile:
C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : warning 215: expression has no effect
C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Scriptu:
new FSPEED[MAX_PLAYERS];
new FJUMP[MAX_PLAYERS];
#define HOLDING(%0) \ ((newkeys & (%0)) == (%0))
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new vehicle = GetPlayerVehicleID(playerid);
if(HOLDING(KEY_FIRE & IsPlayerInAnyVehicle(playerid)))
{
AddVehicleComponent(vehicle, 1010);
}
else
{
if(!IsPlayerInInvalidNosVehicle(vehicle,playerid))
SendClientMessage(playerid,0xFF0000AA,"[Nr1]FANEX: Nu poti adauga nitro la vehiculul asta!");
{
if(FSPEED[playerid] == 1)
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2);
} else { if(FSPEED[playerid] == 0)
}
}
if(newkeys == KEY_SUBMISSION)
{
if (IsPlayerInAnyVehicle(playerid))
{
new Float:health;
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid, health);
if (health < 1000.0)
{
SetVehicleHealth(vehicleid, 1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
}
}
}
if (PRESSED(KEY_HANDBRAKE)) // Change KEY_HANDBRAKE to your choice of PlayerKeys
{
if(FJUMP[playerid] == 1)
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3);
} else {if(FJUMP[playerid] == 0)
}
if(newkeys == KEY_SECONDARY_ATTACK) {
new Float:x, Float:y, Float:z;
new vehicleID = GetPlayerVehicleID(playerid);
if(vehicleID == 0) {
GetPlayerPos(playerid, x, y, z);
GetVehicleWithinDistance(x, y, z, 20.0);
if(IsVehicleRcTram(vehicle)) PutPlayerInVehicle(playerid, vehicle, 0);
} else if(GetVehicleModel(vehicleID) != D_TRAM && (IsVehicleRcTram(vehicleID) || GetVehicleModel(vehicleID) == RC_CAM)) {
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x+0.5, y, z+1.0);
//SetPlayerSpecialAction(playerid,SPECIAL_ACTION_EXIT_VEHICLE);
}
}
return 1;
}
public OnGameModeExit()
{
}
POZA:(daca e novoie mai postez cateva:P in detaliu :'( )
Functia e 100% facuta de mn si cu o zi inainte de a afla ca are errori mergea bine inante sa bag functia de speedboost(cea cu FSPEED[MAX_PLAYERS])
Care e Problema?? L-am contactat si pe RuNix da era ocupat:(Va rog mult un ajutor! multumesc
NOTE: Asta nu e un topic de GF' sper ca nu-l stergeti asa rpd.. lol sau mutatil am pus unu si la sectiunea 'SUPORT' :| cum sterg..lasa
Editat titlul, foloseste titluri in romana.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts