CoS problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CoS problem (
/showthread.php?tid=282562)
CoS problem -
Gagi_Corleone - 11.09.2011
This is how I made cos I now have a problem with the command /v. I did the /v and then color1 [color] [color] but not work.
Start command /v:
Код:
YCMD:v(playerid,params[],help)
{
#pragma unused help
new tekst[64],string[128];
if(sscanf(params, "s[64]", tekst)) return SCM(playerid, -1, "{FFFFFF}Uputstvo: {EB154A}/v(ozilo) [Ime]");
Then here have some codes for park...
Then color1
Код:
else if(strcmp(tekst,"color1",true) == 0)
{
new boja1,boja2;
if(sscanf(params, "ii",boja1,boja2)) return SCM(playerid, -1, "{FFFFFF}Uputstvo: {EB154A}/v(ozilo) boja1 [color] [color]");
new kljuc = GetPVarInt(playerid,"KljucaJedan");
new vehicleid = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
for(new i = 1; i < sizeof(CarInfo); i++)
{
if(vehicleid == 6)
{
CarInfo[kljuc][Boja1] = boja1;
CarInfo[kljuc][Boja2] = boja2;
ChangeVehicleColor(kljuc, CarInfo[kljuc][Boja1],CarInfo[kljuc][Boja2]);
SendClientMessage(playerid, NARANDZASTA, "Vasa nova boja je postavljena!");
UpdateKola(kljuc);
}
else
{
SCM(playerid, CRVENA, "Nisi u svome vozilu!");
}
}
}
else
{
SCM(playerid, CRVENA, "Moras biti u svom vozilu!");
}
return 1;
}
Thank you in advance if anyone has an idea
Re: CoS problem -
System64 - 11.09.2011
you can't use that in sscanf, you want /v than example: lock,unlock,park etc. ? Like in Ivex vehicle owenrship?
Re : Re: CoS problem -
Gagi_Corleone - 11.09.2011
Quote:
Originally Posted by System64
you can't use that in sscanf, you want /v than example: lock,unlock,park etc. ? Like in Ivex vehicle owenrship?
|
Ok. I try with sscanf make some CoS and try with sscanf and dosen't work. Ok thanks. I'll try the other way.
EDIT:
I'll do it in dialog. Then this is solved
Re: CoS problem -
System64 - 11.09.2011
I can learn you how to use sscanf
I'm from Croatia (aka System32)