23.08.2010, 11:42
Part of the command problem:
the problem is.. new level; should to be [Ammo] but is doesnt work well.
everytime when i write the command the ammo set to 0 so i think the problem in new level; level = straval(tmp);
please how to fix it well..
pawn Код:
if(strcmp(cmd, "/trunk2", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new x_job[256];
x_job = strtok(cmdtext, idx);
if(!strlen(x_job)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /trunk [ID] [Ammo]");
return 1;
}
new level;
level = strval(tmp);
new Weap, Ammo;
new car = GetClosestVehicle(playerid);
if(VehicleInfo[car][vT] == 1 || vehiclelocked[car] == 0)
{
if(strcmp(x_job,"24",true) == 0)
{
...............
everytime when i write the command the ammo set to 0 so i think the problem in new level; level = straval(tmp);
please how to fix it well..