30.09.2013, 22:52
Y'all probably think i'm a dumbass for not figuring this out, and requiring help with something soo simple. Well, you're probably right xD (I stopped coding for a while and lost quite a bit of it, IE the reason for all the help threads recently, oh well :P)
On topic, I got an argument type mismatch to set the enum value for my vehicles.
It works if I use the stock I created, GetName(playerid) (which also removes the _ from the name)...But if I try GetName(opid) I get the error.
On topic, I got an argument type mismatch to set the enum value for my vehicles.
pawn Код:
CMD:vowner(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >=4)
{
new vehicleid, opid[30];
if(sscanf(params, "dd", vehicleid, opid))
{
UsageMessage(playerid, "/vowner [vehicleid] [playerid]");
return 1;
}
else
{
new string[30];
new name[30];
GetPlayerName(opid, name, sizeof(name));
format(string, sizeof(string), "%s", name); //ERROR IS THIS LINE!
VehicleInfo[vehicleid][vOwner] = string;
SCM(pid, COLGREEN, "Server: {F0F0F0}You have set the owner of this vehicle.");
return 1;
}
}
return 1;
}