{ } problem
#1

What have i got wrong here

if(strcmp(cmdtext, "/godcar", true) == 0)
{
if(logged[playerid] == 1)
{
if(adminlevel[playerid] >= 4)
{
SetPlayerArmour(playerid, 10000.00);
SetVehicleHealth(playerid, 10000.00);
return 1;
}
Reply
#2

Код:
if(strcmp(cmdtext, "/godcar", true) == 0)
{
if(logged[playerid] == 1 && adminlevel[playerid] >= 4)
{
SetPlayerArmour(playerid, 10000.00);
SetVehicleHealth(playerid, 10000.00);
}
return 1;
}
Reply
#3

Could u explian why sometimes it is like

SetVehicleHealth(playerid, 10000.00);
return 1;
}

and sometimes

SetVehicleHealth(playerid, 10000.00);
}
return 1;
}

If you no a tut please post thanks
Reply
#4

pawn Код:
if(strcmp(cmdtext, "/godcar", true) == 0)
  {
   if(logged[playerid] == 1)
   {
     if(adminlevel[playerid] >= 4)
     {
     if(IsPlayerInAnyVehicle(playerid))
     {
       new ID = GetPlayerVehicleID(playerid);
       SetPlayerArmour(playerid, 10000.00);
       SetVehicleHealth(ID, 10000.00);
       return 1;
       }
  }
Reply
#5

u should add a return 1; at the end of the command so maybe it be coincidence and the command be 1 line like ::

Код:
if(strcmp(cmdtext, "/help", true) == 0)
{
SendClientMessage(playerid,COLOR_RED,"Help");
return 1; // this is the end of the command so we have to put a return 1; }
}
and sometimes it be like this :

Код:
if(strcmp(cmdtext, "/help", true) == 0)
{
if(IsPlayerAdmin(playerid) 
{
SendClientMessage(playerid,COLOR_RED,"Help");
} // this is not the end of the command , its the end of "IsPlayerAdmin"
return 1; // this is the end of the command so we have to put a return 1; }
}
hope i helped
and here is ur command :

if(strcmp(cmdtext, "/godcar", true) == 0)
{
if(logged[playerid] == 1)
{
if(adminlevel[playerid] >= 4)
{
SetPlayerArmour(playerid, 10000.00);
SetVehicleHealth(playerid, 10000.00);
}
}
return 1;
}
Reply
#6

Thanks Etch realy helps say later on server mybe.
Reply
#7

np , anytimes , see u on the server
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)