Quote:
Originally Posted by ricardo178
You are wrong. My post is the one that helps. If i make thhe code for you, you just copy/paste instead of work to fix your own errors. That's how i've learn. Try it.. If doesnn't work, just tell.
But ok.. Here you go, not tested, made almost sleeping, hope it works.
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 = GetPlayerVehicleID(playerid); DestroyVehicle(currentveh); return 1; } 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); return 1; } printf("Admin %s: Deleted the vehicle", sendername); SendClientMessage(playerid, COLOR_GRAD1,"Vehicle deleted!"); } return 1; }
|
That is why I stated what was wrong, not made up a little trivia to guess where the problem is. Plus our commands are exactly the same, the only difference is the else statement.