Race gamemode problem.
#1

Delte
Reply
#2

I dont know if i fixed it, but i know that there something wrong with the return

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/racetrack", cmdtext, true, 10) == 0)
{
if (IsPlayerInAnyVehicle(playerid));
{
DestroyVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid,COLOR_RED,"Bye bye car!, Typ /cars for a new car");
}
else
{
new sendername[MAX_PLAYER_NAME];
new string[256];
format (string, sizeof(string),"%s has been teleported to racetrack! typ /racetrack to follow him!", sendername);
SendClientMessageToAll(COLOR_GREEN, sendername);
SendClientMessage(playerid, COLOR_RED, "You have been send to the racetrack!");
SetPlayerPos(playerid,-521.0,-3643.0,7.0);
SetPlayerFacingAngle(playerid,0.0);
SendClientMessage(playerid,COLOR_GREY,"Typ /nos to get NOS And Hydraulics& Repair!");
return 1;
}
}

if (strcmp("/nos", cmdtext, true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, COLOR_WHITE,"Your Vehicle has been modified!");
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not in a Vehicle, Typ /Ferrari to get a Infernus!");
}
return 1;
}

if (strcmp("/Ferrari", cmdtext, true) == 0)
{
if (IsPlayerInAnyVehicle(playerid));
{
SendClientMessage(playerid,COLOR_RED, "You are already in a vehicle!");
}
else
{
CreateVehicle(411,-521.0,-3643.0,7.0,1,1,0)
}
return 1;
}
return 0;
}
Reply
#3

Edited, Look now please.
Reply
#4

There is nothing wrong with the /nos command, I think, we just need to fix the /racetrack command you ruined so you can remove /nos now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)