01.05.2012, 18:39
My pawno is giving 26 errors
PHP код:
if (strcmp(cmdtext, "/lock", true)==0)
{
if(PlayerInfo[playerid][pDonateRank] >= 2)
{
print("Car locked");
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xFFFF00AA,"You must be an driver to do this.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
SendClientMessage(playerid, 0xFFFF00AA, "Car locked!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "You don't have an car.");
}
return 1;
}
PHP код:
if (strcmp(cmdtext, "/unlock", true)==0)
{
if(PlayerInfo[playerid][pDonateRank] >= 2)
{
print("Car unlocked");
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xFFFF00AA,"You must be an driver to do this.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
SendClientMessage(playerid, 0xFFFF00AA, "Car unlocked.");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1057,pX,pY,pZ);
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "You don't have an car.");
}
return 1;
}