can someone tell me why this code is fucked up please
#1

pawn Код:
if(strcmp(cmd, "/Surface", true) == 0)
    {
        if(gTeam[playerid] == Russia)
        {
            if(Submerged == 1)
            {
                SendClientMessage(playerid, 0x0000FFFF, "The Sub is surfacing now please wait....");
                MoveObject(Submarine,-3844.18, 1727.39, 4.14, 10, -4.00, 0.00);
                Submerged = 0;
            }
            SendClientMessage(playerid, 0x0000FFFF, "Sub is already surfaced.");
        }
        SendClientMessage(playerid, 0x0000FFFF, "You have to be Russian to access the codes to surface.");
        return 1;
    }
    if(strcmp(cmd, "/Submerge", true) == 0)
    {
        if(gTeam[playerid] == Russia)
        {
            if(Submerged == 0)
            {
                if(O2Level >100)
                {
                    SendClientMessage(playerid, 0x0000FFFF, "The Sub is Submerging now please wait....");
                    MoveObject(Submarine,-3844.18, 1727.39, -10.00, 10, 0.00, 0.00);
                    Submerged = 1;
                }
                SendClientMessage(playerid, 0x0000FFFF, "Sub has not recharged its O2");
            }
            SendClientMessage(playerid, 0x0000FFFF, "Sub is already underwater.");
        }
        SendClientMessage(playerid, 0x0000FFFF, "You have to be Russian to access the codes the submerge.");
        return 1;
    }
well it compiles fine but when i go ingame i get the errors "Sub has not recharged its O2", "Sub is already underwater" or "You have to be russian blablablabla".

before you ask about using ZCMD or YCMD or something like that, i will change it over when i get time :P.

can someone please help me
Reply
#2

Show the errors
Reply
#3

PHP код:
if(strcmp(cmd"/Surface"true) == 0)
{
    if(
gTeam[playerid] != Russia)
        return 
SendClientMessage(playerid0x0000FFFF"You have to be Russian to access the codes to surface.");
    if(
Submerged != 1)
        return 
SendClientMessage(playerid0x0000FFFF"Sub is already surfaced.");
    
SendClientMessage(playerid0x0000FFFF"The Sub is surfacing now please wait....");
    
MoveObject(Submarine,-3844.181727.394.1410, -4.000.00);
    
Submerged 0;
    return 
1;
}    

if(
strcmp(cmd"/Submerge"true) == 0)
{
    if(
gTeam[playerid] != Russia)
        return 
SendClientMessage(playerid0x0000FFFF"You have to be Russian to access the codes the submerge.");
    if(
Submerged != 0)
        return 
SendClientMessage(playerid0x0000FFFF"Sub is already underwater.");
    if(
O2Level <= 100)
        return 
SendClientMessage(playerid0x0000FFFF"Sub has not recharged its O2");
    
SendClientMessage(playerid0x0000FFFF"The Sub is Submerging now please wait....");
    
MoveObject(Submarine,-3844.181727.39, -10.00100.000.00);
    
Submerged 1;
    return 
1;

Reply
#4

thx Shadoww5 repped it's working now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)