Help me! please! pleaseeeeee!!!! -
Smilzo - 11.06.2010
Hello my name is Smilzo.
I have a problem with my script.
it is to add the supercharger, turbo and Twinturbo
on their car.
But I can not understand where are the damn 5 mistakes!
The first is especially unnerving, namely: undefined symbol CMD.
surely they must be added with commands / SC (supercharged) / tc (turbocharged) / ttc (Twinturbo).
I've got to put all 3, but it tells me that error!
the other four errors do not have the faintest idea!
please give me a hand! please!
I place the script here:
Re: Help me! please! pleaseeeeee!!!! -
Smilzo - 11.06.2010
ah! sorry the script is not posted, but is attached.
however I put it.
please help me thanks
bye bye!
Re: Help me! please! pleaseeeeee!!!! -
(SF)Noobanatior - 11.06.2010
pawn Код:
// SuperCharged - TurboCharged - TwinturboCharged
#include <a_samp>
#define COLOR_GREEN 0x9EC73DAA
#define COLOR_BRIGHTRED 0xFF6347AA
#define COLOR_YELLOW 0xDABB3EAA
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new SuperCharged[MAX_PLAYERS];
new TurboCharged[MAX_PLAYERS];
new TwinturboCharged[MAX_PLAYERS];
public OnFilterScriptInit()
{
// Print to server console
print("\n-------------------------------------------------");
print(" Sc - Tc - Ttc Filterscript by Smilzo");
print("-------------------------------------------------\n");
// Exit here
return 1;
}
public OnFilterScriptExit()
{
// Print to server console
print("\n------------------------------------------------");
print(" Unloaded Sc - Tc - Ttc Filterscript by Smilzo");
print("------------------------------------------------\n");
// Exit here
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]){
if (strcmp(cmdtext, "/Sc", true) == 0) {
if(IsPlayerInAnyVehicle(playerid)) {
SuperCharged[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"You have added the SuperCharger!");
}
if(!IsPlayerInAnyVehicle(playerid)) {
SuperCharged[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,"You must spawn a car!");
}
}
if (strcmp(cmdtext, "/Tc", true) == 0) {
if(IsPlayerInAnyVehicle(playerid)) {
TurboCharged[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"You have added the Turbo!");
}
if(!IsPlayerInAnyVehicle(playerid)) {
TurboCharged[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,"You must spawn a car!");
}
}
if (strcmp(cmdtext, "/Ttc", true) == 0) {
if(IsPlayerInAnyVehicle(playerid)) {
TwinturboCharged[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"You have added the Twinturbo!");
}
if(!IsPlayerInAnyVehicle(playerid)) {
TwinturboCharged[playerid] = 0;
SendClientMessage(playerid,COLOR_BRIGHTRED,"You must spawn a car!");
}
}
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
if (PRESSED(KEY_FIRE)) {
if(SuperCharged[playerid] == 1){
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.1);
}
else if(TurboCharged[playerid] == 1){
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.2);
}
else if(TwinturboCharged[playerid] == 1){
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3);
}
}
}
}
something like that? btw z velocity is your up and down speed
Re: Help me! please! pleaseeeeee!!!! -
Smilzo - 12.06.2010
I thank you for the help, but now gives me 6 errors and some warnings.
I will show you all here so you can better understand:
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(49 ) : warning 217: loose indentation
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(59 ) : warning 217: loose indentation
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(70 ) : warning 217: loose indentation
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(74 ) : warning 217: loose indentation
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(85 ) : warning 217: loose indentation
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(85 ) : error 017: undefined symbol "GetVehicleVelocity"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(86 ) : error 017: undefined symbol "SetVehicleVelocity"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(84 ) : warning 203: symbol is never used: "y"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(84 ) : warning 203: symbol is never used: "x"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(90 ) : error 017: undefined symbol "GetVehicleVelocity"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(91 ) : error 017: undefined symbol "SetVehicleVelocity"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(89 ) : warning 203: symbol is never used: "y"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(89 ) : warning 203: symbol is never used: "x"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(89 -- 93) : warning 217: loose indentation
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(89 -- 95) : warning 217: loose indentation
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(95 ) : error 017: undefined symbol "GetVehicleVelocity"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(96 ) : error 017: undefined symbol "SetVehicleVelocity"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(94 ) : warning 203: symbol is never used: "y"
C:\DOCUME~1\casa\DOCUME~1\FILERI~1\TURBOB~1.PWN(94 ) : warning 203: symbol is never used: "x"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
Re: Help me! please! pleaseeeeee!!!! -
Smilzo - 12.06.2010
However the problem I had before is solved, recognizes the cmd.