if (strcmp(cmd, "/changeplate", true, 12)==0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /changeplate [platenumber (up to 8 chars, use '-' for space char)]"); return 1; } if(IsPlayerInAnyVehicle(playerid) == 1) { SetVehicleNumberPlate(GetPlayerVehicleID(playerid) , cmd); new vehid=GetPlayerVehicleID(playerid); SetVehicleToRespawn(vehid); SendClientMessage(playerid, 0xFF9900AA, "License plate changed!"); new Float; new Float:y; new Float:z; new Float; GetVehicleZAngle(vehid, p); GetPlayerPos(playerid, x, y, z); SetVehiclePos(vehid, x, y, z); SetVehicleZAngle(vehid, p); //GameTextForPlayer(playerid, cmd, 2500, 3); PutPlayerInVehicle(playerid, vehid, 0); return 1; } else { SendClientMessage(playerid, 0xFF9900AA, "You are not in a vehicle."); } return 1; } |
if(!strcmp(cmd, "/changeplate", true, 12))
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /changeplate [platenumber (up to 8 chars, use '-' for space char)]");
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, 0xFF9900AA, "You are not in a vehicle.");
new vehid = GetPlayerVehicleID(playerid);
SetVehicleNumberPlate(GetPlayerVehicleID(playerid),tmp);
SetVehicleToRespawn(vehid);
SendClientMessage(playerid, 0xFF9900AA, "License plate changed!");
new Float:x, Float:y, Float:z, Float:a;
GetVehicleZAngle(vehid,a);
GetPlayerPos(playerid,x,y,z);
SetVehiclePos(vehid,x,y,z);
SetVehicleZAngle(vehid,a);
PutPlayerInVehicle(playerid, vehid, 0);
return 1;
}
if(!strcmp(cmd, "/changeplate", true, 12))
{
new tmp[128], file, name[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /changeplate [platenumber (up to 8 chars, use '-' for space char)]");
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, 0xFF9900AA, "You are not in a vehicle.");
format(file, sizeof(file), "%s's plate.ini", name);
if(!dini_Exists(file)) {
dini_Create(file);
dini_IntSet(file, "CarPlate", tmp);
}
new vehid = GetPlayerVehicleID(playerid);
SetVehicleNumberPlate(GetPlayerVehicleID(playerid),tmp);
SetVehicleToRespawn(vehid);
SendClientMessage(playerid, 0xFF9900AA, "License plate changed!");
new Float:x, Float:y, Float:z, Float:a;
GetVehicleZAngle(vehid,a);
GetPlayerPos(playerid,x,y,z);
SetVehiclePos(vehid,x,y,z);
SetVehicleZAngle(vehid,a);
PutPlayerInVehicle(playerid, vehid, 0);
return 1;
}
warning 219: local variable "tmp" shadows a variable at a preceding level error 035: argument type mismatch (argument 1) error 035: argument type mismatch (argument 1) error 035: argument type mismatch (argument 1) error 035: argument type mismatch (argument 1) error 035: argument type mismatch (argument 1) warning 203: symbol is never used: "file" |
if(!strcmp(cmd, "/changeplate", true, 12)) { new tmp[128], name[MAX_PLAYER_NAME], file[128]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /changeplate [platenumber (up to 8 chars, use '-' for space char)]"); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF9900AA, "You are not in a vehicle."); format(file, sizeof(file), "%s's plate.ini", name); if(!dini_Exists(file)) { dini_Create(file); dini_IntSet(file, "CarPlate", tmp); } new vehid = GetPlayerVehicleID(playerid); SetVehicleNumberPlate(GetPlayerVehicleID(playerid) ,tmp); SetVehicleToRespawn(vehid); SendClientMessage(playerid, 0xFF9900AA, "License plate changed!"); new Float, Float:y, Float:z, Float:a; GetVehicleZAngle(vehid,a); GetPlayerPos(playerid,x,y,z); SetVehiclePos(vehid,x,y,z); SetVehicleZAngle(vehid,a); PutPlayerInVehicle(playerid, vehid, 0); return 1; } |
(35007) : warning 219: local variable "tmp" shadows a variable at a preceding level (35019) : error 035: argument type mismatch (argument 3) |