Teleport Help
#1

I made this command >
PHP код:
CMD:hghome(playerid,params[]) {
    
#pragma unused params
    
if(PlayerInfo[playerid][HGRank] >= 1);
    if(
PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
        
TeleTimer[playerid] = SetTimerEx("ttimer"1000true"i",playerid);
        
tseconds[playerid] = 6;
        
format(tstring,45,"You Must wait %d seconds before teleporting"tseconds[playerid]-1);
        if(
PlayerInfo[playerid][Level] == 0SendClientMessage(playerid,COLOR_LIGHTBLUEtstring);
        
Tx[playerid] =239.6844;
        
Ty[playerid] =1860.2457;
        
Tz[playerid] =14.0840;
        
Ti[playerid] = 0;
        new 
string[128];
        new 
dsname[MAX_PLAYER_NAME];
        
format(telestring[playerid],43,"HG Base!");
        
GetPlayerName(playeriddsnamesizeof(dsname));
        
format(stringsizeof(string), "[INFO]: {4169FF}%s has Teleported To HG Members Base"dsname);
        
SendClientMessageToAll(redstring);
        
ShowPlayerDialogplayeridDIALOGID3+24DIALOG_STYLE_LIST"Vehicle Types""Bikes\nConvertibles\nIndustrial\nLowriders\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons""Select""Cancel" );
        return 
SetTimerEx("setstunt",3000,0,"i"playerid);
    } else return 
SendClientMessage(playerid,red"ERROR: You must be HG Member to use this command.");

But, I found this Error >
Код:
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(52037) : error 036: empty statement
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(52055) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
How To Fix This Error?
Please Tell Me Who Know My Problem Solution...
Thanks And God Bless You All
Reply
#2

what are the error lines?
Reply
#3

Код:
if(PlayerInfo[playerid][HGRank] >= 1);
Remove the ;

Код:
CMD:hghome(playerid,params[]) { 
    #pragma unused params 
    if(PlayerInfo[playerid][HGRank] >= 1) {
    if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!"); 
        TeleTimer[playerid] = SetTimerEx("ttimer", 1000, true, "i",playerid); 
        tseconds[playerid] = 6; 
        format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1); 
        if(PlayerInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring); 
        Tx[playerid] =239.6844; 
        Ty[playerid] =1860.2457; 
        Tz[playerid] =14.0840; 
        Ti[playerid] = 0; 
        new string[128]; 
        new dsname[MAX_PLAYER_NAME]; 
        format(telestring[playerid],43,"HG Base!"); 
        GetPlayerName(playerid, dsname, sizeof(dsname)); 
        format(string, sizeof(string), "[INFO]: {4169FF}%s has Teleported To HG Members Base", dsname); 
        SendClientMessageToAll(red, string); 
        ShowPlayerDialog( playerid, DIALOGID3+24, DIALOG_STYLE_LIST, "Vehicle Types", "Bikes\nConvertibles\nIndustrial\nLowriders\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons", "Select", "Cancel" ); 
        return SetTimerEx("setstunt",3000,0,"i", playerid); 
    } else return SendClientMessage(playerid,red, "ERROR: You must be HG Member to use this command."); 
}
Reply
#4

Quote:
Код:
if(PlayerInfo[playerid][HGRank] >= 1);
What the hell is this?
It's supposed to be like this:
Код:
if (...)
{

}
else //...
That should fix the first error, and I can't find the second one, show us the line.
Reply
#5

This is the all of errors.
But it's dont change the work of the server.
The warning dont give some effect.
Код:
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(2177) : warning 201: redefinition of constant/macro (symbol "COLOR_BROWN")
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(24582) : warning 213: tag mismatch
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(25608) : warning 219: local variable "armour" shadows a variable at a preceding level
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(28640) : warning 217: loose indentation
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(28655) : warning 217: loose indentation
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(28656) : warning 217: loose indentation
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(29165) : warning 219: local variable "armour" shadows a variable at a preceding level
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(32667) : warning 217: loose indentation
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(32678) : warning 217: loose indentation
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(32692) : warning 217: loose indentation
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(32703) : warning 217: loose indentation
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(40738) : warning 219: local variable "hp" shadows a variable at a preceding level
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(52037) : error 036: empty statement
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(52039) : warning 217: loose indentation
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(52055) : error 010: invalid function or declaration
F:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(52255) : warning 203: symbol is never used: "armour"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#6

Try it

Код:
CMD:hghome(playerid,params[]) { 
    #pragma unused params 
	
    if(PlayerInfo[playerid][HGRank] == 0)
		return SendClientMessage(playerid,red, "ERROR: You must be HG Member to use this command."); 

	if(PlayerInfo[playerid][Jailed] == 1)
		return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!"); 
		
    TeleTimer[playerid] = SetTimerEx("ttimer", 1000, true, "i",playerid); 
    tseconds[playerid] = 6; 
    format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1); 
    if(PlayerInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring); 
    Tx[playerid] = 239.6844; 
    Ty[playerid] = 1860.2457; 
    Tz[playerid] = 14.0840; 
    Ti[playerid] = 0; 
    new string[128]; 
    new dsname[MAX_PLAYER_NAME]; 
    format(telestring[playerid],43,"HG Base!"); 
    GetPlayerName(playerid, dsname, sizeof(dsname)); 
    format(string, sizeof(string), "[INFO]: {4169FF}%s has Teleported To HG Members Base", dsname); 
    SendClientMessageToAll(red, string); 
    ShowPlayerDialog( playerid, DIALOGID3+24, DIALOG_STYLE_LIST, "Vehicle Types", "Bikes\nConvertibles\nIndustrial\nLowriders\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons", "Select", "Cancel" ); 
    SetTimerEx("setstunt",3000,0,"i", playerid); 

	return true;
}
Reply
#7

Please Tell Me How To Give A Reputation Point?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)