Help with command
#1

sorry bout this but im stuck what i need help with is my sellveh command what i want it to do is /selveh[player][Ammount] so you can sell it to a member ingame, any ideas on how i would do this, here you go V

Код:
	if (strcmp(cmd, "/sellveh", true) ==0 )
	{
	if(!IsPlayerInAnyVehicle(playerid)){return 1;}
	if(GetCreatorID(vehicleid)!=0)
	{
	if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
	{
	tmp = strtok(cmdtext,idx);
	if(!strlen(tmp)){SendClientMessage(playerid,WHITE,"INFO: /sellveh [Price]");return 1;}
	new Float:vx,Float:vy,Float:vz,Float:va;
	GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz);
	GetVehicleZAngle(GetPlayerVehicleID(playerid),va);
	VehicleSystem[GetCreatorID(vehicleid)][x]=vx;
	VehicleSystem[GetCreatorID(vehicleid)][y]=vy;
	VehicleSystem[GetCreatorID(vehicleid)][z]=vz;
	VehicleSystem[GetCreatorID(vehicleid)][a]=va;
	VehicleSystem[GetCreatorID(vehicleid)][preis]=strval(tmp);
	strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar",0,128,128);
	SendClientMessage(playerid,WHITE,"This vehicle is now for Sale!");
	GivePlayerMoney(playerid,strval(tmp));
	SaveTool();
	}
	else
	{
	SendClientMessage(playerid,WHITE,"This Vehicle isnt yours!");
	}
	}
	return 1;
	}
Reply
#2

Add one more strtok and use ReturnUser.
Reply
#3

will this do it m8..
Код:
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
Reply
#4

i added them but all i get is error 017: undefined symbol "giveplayerid" error 017: undefined symbol "ReturnUser" can u help please u must be placing it in the wrong place
Reply
#5

can anyone help pl0x
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)