02.03.2012, 22:55
pawn Код:
if(strcmp(cmdtext, "/delveh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /delveh");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >=2)
{
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
DestroyVehicle(currentveh);
}
else SendClientMessage(playerid, COLOR_RED,"You're not admin!");
{
format(string, sizeof(string), "*%d Admin %s: Deleted the vehicle", PlayerInfo[playerid][pAdmin], sendername);
SendAdminMessage(COLOR_YELLOW,string);
}
printf("Admin %s: Deleted the vehicle", sendername);
SendClientMessage(playerid, COLOR_GRAD1,"Vehicle deleted!");
}
return 1;
}
Thanks :P