Can someone help me? /v [input1] [1=2=3] - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can someone help me? /v [input1] [1=2=3] (
/showthread.php?tid=85860)
Can someone help me? /v [input1] [1=2=3] -
Jameston12 - 10.07.2009
This is a little code from my script, no errors but it doesnt work if I do:
/v create 555 2 2 for example.
It doesnt say anthing on the screen, but if I do /v create it does return the UsageMsg.
I hope anyone can help me with this.
Help would be very appriciated!
Kind regards,
James.
pawn Код:
dcmd_v(playerid, params[]){
new action[256];
if(sscanf(params, "s", action)) return UsageMsg(playerid, "/v [create/destroy/save]");
if(!strcmp(action, "create", true)){
new modelid, color1, color2, string[256];
if(sscanf(params, "ddd", modelid, color1, color2)) return UsageMsg(playerid, "/v create [modelid] [color1] [color2]");
format(string, sizeof(string), "Created vehicle: Modelid: %d, color1: %d and color2: %d", modelid, color1, color2);
SuccesMsg(playerid, string);
return 1;
}
if(!strcmp(action, "destroy", true)){
SuccesMsg(playerid, "Destroy");
return 1;
}
if(!strcmp(action, "save", true)){
SuccesMsg(playerid, "Save");
return 1;
}
return 1;
}