[HELP]/v lock1 game text not working
#1

Ok when i do /v lock1 it is supposed to say the vehicle name and dat it got lock but it doesnt it says unknown command

else if(strcmp(x_nr,"lock1",true) == 0)
{
new keycar = PlayerInfo[playerid][pPcarkey];
if(keycar != 999)
{
new locked[256];
locked = strtok(cmdtext, idx);
if(CarInfo[keycar][cLock] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,0);
}
}
format(string, sizeof(string), "~w~%s~n~~g~Unlocked",result,CarName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 0;
OnPropUpdate();
return 1;
}
else if(CarInfo[keycar][cLock] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,1);
}
}
format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 1;
OnPropUpdate();
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 1");
return 1;
}
}
else if(strcmp(x_nr,"lock2",true) == 0)
{
new keycar = PlayerInfo[playerid][pPcarkey2];
if(keycar != 999)
{
new locked[256];
locked = strtok(cmdtext, idx);
if(CarInfo[keycar][cLock] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,0);
}
}
format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 0;
OnPropUpdate();
return 1;
}
else if(CarInfo[keycar][cLock] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,1);
}
}
format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 1;
OnPropUpdate();
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 2");
return 1;
}
}
else if(strcmp(x_nr,"lock3",true) == 0)
{
new keycar = PlayerInfo[playerid][pPcarkey3];
if(keycar != 999)
{
new locked[256];
locked = strtok(cmdtext, idx);
if(CarInfo[keycar][cLock] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,0);
}
}
format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 0;
OnPropUpdate();
return 1;
}
else if(CarInfo[keycar][cLock] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,1);
}
}
format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 1;
OnPropUpdate();
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 3");
return 1;
}
}

But when i put the regular gametext back it works it says Vehicle Locked but not with the one i did
Reply
#2

?
Reply
#3

OMG someone please reply
Reply
#4

Bumped
Reply
#5

BUMPED
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)