public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hyd", cmdtext, true, 10) == 0)
{
if(gVIP[playerid] == 1)
if(IsPlayerInAnyVehicle(playerid))
SendClientMessage(playerid, COLOR_GREEN, "Hydraulics added to your vehicle!");
AddVehicleComponent(vehicleid, 1087);
else
SendClientMessage(playerid, COLOR_RED, "You're not in a car!");
else
SendClientMessage(playerid, COLOR_RED, "You're not a VIP!");
return 1;
}
return 0;
}
C:\Users\Jack\Desktop\samp\filterscripts\adminscript.pwn(89) : error 017: undefined symbol "vehicleid" C:\Users\Jack\Desktop\samp\filterscripts\adminscript.pwn(90) : error 029: invalid expression, assumed zero C:\Users\Jack\Desktop\samp\filterscripts\adminscript.pwn(92) : error 029: invalid expression, assumed zero Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.
Hi, I need some help with these errors! I am pasting the code below, from line 82
Thanks for helping! |
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hyd", cmdtext, true, 10) == 0)
{
if(gVIP[playerid] == 1){
if(IsPlayerInAnyVehicle(playerid)){
SendClientMessage(playerid, COLOR_GREEN, "Hydraulics added to your vehicle!");
AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);}
else{
SendClientMessage(playerid, COLOR_RED, "You're not in a car!");}
else{
SendClientMessage(playerid, COLOR_RED, "You're not a VIP!");}
return 1;
}
return 0;
}
Wow you are really bad at pawn..
pawn Код:
|
if (strcmp("/hyd", cmdtext, true, 10) == 0)
{
if(gVIP[playerid] >= 1)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
AddVehicleComponent(vehicleid, 1087);
}else{
SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!!");
}
} else return SendClientMessage(playerid,0xFF0000AA,"You're not a VIP!");
return 1;
}