Versuch es mal so:
(Ungetestet)
if(strcmp(cmd, "/setvhp", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setvhp [playerid/PartOfName] [health]");
new carid, health;
tmp = strtok(cmdtext, idx);
carid = strval(tmp);
tmp = strtok(cmdtext, idx);
health = floatstr(tmp);
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(carid != INVALID_VEHICLE_ID)
{
SetVehicleHealth(carid, health);
}
}
else SendClientMessage(playerid, COLOR_RED, "Du bist nicht befugt diesen Command zu benutzen (R4 +)!");
}
return 1;
}
Mit freundlichen Grüßen,
Zunno