DM script -
Stefand - 17.11.2011
Hi users and scripers
i am scripting a DM script but it gives some errors and i wanna know how i can make this:
I have made the /mytime , /carcolor command.
1 question how do i make that command working, that a player type /carcolor 50 1 the car gets that color.
same with /mytime how do i gets the player that time if he types /mytime 15 00
and the errors it give are
C:\Users\Stefan Dorst\Desktop\DM\gamemodes\Deathmatch.pwn(197) : error 017: undefined symbol "vehicleid"
C:\Users\Stefan Dorst\Desktop\DM\gamemodes\Deathmatch.pwn(206) : error 017: undefined symbol "vehicleid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
and this is my script:
http://pastebin.com/DyevFYwh
Re: DM script -
Stigg - 17.11.2011
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
ChangeVehicleColor(vehicleid,//blah blah
Re: DM script -
Stefand - 17.11.2011
and how do i make that /mytime and /carcolor working?
Re: DM script -
Stefand - 17.11.2011
and if i do new vehicleid = GetPlayerVehicleID(playerid);
my windows give error: Compiler doesnt work anymore.
then i close it remove that new thing and then its working again
Re: DM script -
CSSI - 17.11.2011
pawn Код:
if(strcmp(cmd,"/mytime",true) == 0)
{
SetPlayerTime(playerid,hour,minute);
}
Change The hour,minute to what you want.
Re: DM script -
Stefand - 17.11.2011
i want the time to what the players type
Re: DM script -
CSSI - 17.11.2011
pawn Код:
if(strcmp(cmd,"/mytime",true) == 0)
{
new tmp[256];
tmp = strtok(cmdtext,idx);
hour = strval(tmp);
minute = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"/mytime hour minute");
SetPlayerTime(playerid,hour,minute);
}
Re: DM script -
Kostas' - 17.11.2011
In case, you are using ZCMD
pawn Код:
CMD:time(playerid, o[])
{
if(isnull(o)) return SCM(playerid, COLOR_RED, "[ERROR]: Usage /time [0-24]");
if(strval(o) > 24 || strval (o) < 0) return SCM(playerid, COLOR_RED, "Available Time IDs (0 - 24)");
SetPlayerTime(playerid,strval(o), 0);
SetPlayerTime(playerid,strval(o), 1);
SetPlayerTime(playerid,strval(o), 2);
SetPlayerTime(playerid,strval(o), 3);
SetPlayerTime(playerid,strval(o), 4);
SetPlayerTime(playerid,strval(o), 5);
SetPlayerTime(playerid,strval(o), 6);
SetPlayerTime(playerid,strval(o), 7);
SetPlayerTime(playerid,strval(o), 8);
SetPlayerTime(playerid,strval(o), 9);
SetPlayerTime(playerid,strval(o), 10);
SetPlayerTime(playerid,strval(o), 11);
SetPlayerTime(playerid,strval(o), 12);
SetPlayerTime(playerid,strval(o), 13);
SetPlayerTime(playerid,strval(o), 14);
SetPlayerTime(playerid,strval(o), 15);
SetPlayerTime(playerid,strval(o), 16);
SetPlayerTime(playerid,strval(o), 17);
SetPlayerTime(playerid,strval(o), 18);
SetPlayerTime(playerid,strval(o), 19);
SetPlayerTime(playerid,strval(o), 20);
SetPlayerTime(playerid,strval(o), 21);
SetPlayerTime(playerid,strval(o), 22);
SetPlayerTime(playerid,strval(o), 23);
SetPlayerTime(playerid,strval(o), 24);
return 1;
}
pawn Код:
CMD:carcolor(playerid, o[])
{
new vehicleid, color1, color2;
if((vehicleid = GetPlayerVehicleID(playerid)))
{
if(sscanf(o, "dd", color1, color2)) return SCM(playerid, COLOR_RED, "[ERROR]: Usage: /carcolor [color 1] [color 2]");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_RED, "[ERROR]: You' re not driver!");
ChangeVehicleColor(vehicleid, color1, color2);
SCM(playerid, COLOR_GREEN, "Your car colors have been changed permantly!");
return 1;
}
else return SCM(playerid, COLOR_RED, "[ERROR]: You are not in a vehicle!");
}
Re: DM script -
CSSI - 17.11.2011
He use strcmp not ZCMD -_-
Re: DM script -
Kostas' - 17.11.2011
Oh! I didn't see the pastebin, only the commands he wants.