10.09.2011, 22:51
(
Последний раз редактировалось N.K.Stallone; 22.01.2019 в 20:31.
)
REMOVED
Nothing perfect, but good for a newbie scripter + put an pastebin link
|
if (strcmp("/checkmyteam", cmdtext, true) == 0)
{
if(pTeam[playerid] == team_lspd){
SendClientMessage(playerid, COLOR_YELLOW , "You are LSPD officer !");
return 1;
}
if(pTeam[playerid] == team_gang){
SendClientMessage(playerid, COLOR_YELLOW , "You are a Gangster you need to be careful about cops !");
return 1;
}
return 1;
}
if (strcmp("/checkmyteam", cmdtext, true) == 0)
{
if(pTeam[playerid] == team_lspd)
{
SendClientMessage(playerid, COLOR_YELLOW , "You are LSPD officer !");
}
else if(pTeam[playerid] == team_gang)
{
SendClientMessage(playerid, COLOR_YELLOW , "You are a Gangster you need to be careful about cops !");
return 1;
}
if (strcmp("/repair", cmdtext, true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)){
SendClientMessage(playerid, COLOR_GREEN , "You need to be in a vehicle to use the /repair command.");
return 1;
}
new vehicleid = GetPlayerVehicleID(playerid);
new string[128];
format(string, sizeof(string), "You repaired Vehicle ID: %d", vehicleid);
SendClientMessage(playerid, COLOR_GREEN , string);
RepairVehicle(vehicleid);
return 1;
}
if (strcmp("/repair", cmdtext, true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREEN , "You need to be in a vehicle to use the /repair command.");
}
else
{
new vehicleid = GetPlayerVehicleID(playerid);
new string[128];
format(string, sizeof(string), "You repaired Vehicle ID: %d", vehicleid);
SendClientMessage(playerid, COLOR_GREEN , string);
RepairVehicle(vehicleid);
}
return 1;
}
The script is tottally fucked, you are always putting return 1; in every place
example: pawn Код:
pawn Код:
and pawn Код:
pawn Код:
|