i need a script gift
#1

I need a script gift when the new players register write [/cadou] receive 3.000.000$ + Level 2

if(!strcmp(cmdtext, "/cadou", true))
{
new string4[658], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
strcat(string4, "Key activated: cadou\n");
strcat(string4, "\n");
strcat(string4, "In this key you will have:\n");
strcat(string4, "\n");
strcat(string4, "3000000$\n");
strcat(string4, "2 Level");
ShowPlayerDialog(playerid, DIALOG_UPDATES, DIALOG_STYLE_MSGBOX, "Gift:", string4, "Okay", "");
PlayerInfo[playerid][pCash] += 3000000;
PlayerInfo[playerid][pLevel] += 2;
printf("Key activated: cadou");
printf("Player: %s", pName);
SetTimerEx("gKey", 3600, false, "i", playerid);
return 1;
}

Errors:

C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(1) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(3) : error 017: undefined symbol "MAX_PLAYER_NAME"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(5) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(5) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(6) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(6) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(7) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(7) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn( : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn( : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(9) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(9) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(10) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(10) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(11) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(12) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(15) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(16) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(17) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(19) : warning 203: symbol is never used: "pName"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(19) : warning 203: symbol is never used: "string4"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(19) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


14 Errors.
Reply
#2

write full code here
Reply
#3

i don't have code because i dont know how i can create one
Reply
#4

This is not a place for requests. Stop bumping your topic. Honestly, if you want to start a server at least try and learn how to code.
Reply
#5

if(!strcmp(cmdtext, "/cadou", true))
{
new string4[658], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
strcat(string4, "Key activated: cadou\n");
strcat(string4, "\n");
strcat(string4, "In this key you will have:\n");
strcat(string4, "\n");
strcat(string4, "3000000$\n");
strcat(string4, "2 Level");
ShowPlayerDialog(playerid, DIALOG_UPDATES, DIALOG_STYLE_MSGBOX, "Gift:", string4, "Okay", "");
PlayerInfo[playerid][pCash] += 3000000;
PlayerInfo[playerid][pLevel] += 2;
printf("Key activated: cadou");
printf("Player: %s", pName);
SetTimerEx("gKey", 3600, false, "i", playerid);
return 1;
}
Reply
#6

pawn Код:
if(!strcmp(cmdtext, "/cadou", true))
{
new stringtext[658], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
strcat(stringtext, "Key activated: cadou\n", sizeof(stringtext));
strcat(stringtext, "Key activated: cadou\n\n",sizeof(stringtext));
strcat(stringtext, "In this key you will have:\n\n",sizeof(stringtext));
strcat(stringtext, "3000000$\n",sizeof(stringtext));
strcat(stringtext, "2 Level",sizeof(stringtext));
ShowPlayerDialog(playerid, DIALOG_UPDATES, DIALOG_STYLE_MSGBOX, "Gift:", stringtext, "Okay", "");
PlayerInfo[playerid][pCash] += 3000000;
PlayerInfo[playerid][pLevel] += 2;
printf("Key activated: cadou");
printf("Player: %s", pName);
SetTimerEx("gKey", 3600, false, "i", playerid);
return 1;
}
Reply
#7

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/cadou", true))
{
new stringtext[658], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
strcat(stringtext, "Key activated: cadou\n", sizeof(stringtext));
strcat(stringtext, "Key activated: cadou\n\n",sizeof(stringtext));
strcat(stringtext, "In this key you will have:\n\n",sizeof(stringtext));
strcat(stringtext, "3000000$\n",sizeof(stringtext));
strcat(stringtext, "2 Level",sizeof(stringtext));
ShowPlayerDialog(playerid, DIALOG_UPDATES, DIALOG_STYLE_MSGBOX, "Gift:", stringtext, "Okay", "");
PlayerInfo[playerid][pCash] += 3000000;
PlayerInfo[playerid][pLevel] += 2;
printf("Key activated: cadou");
printf("Player: %s", pName);
SetTimerEx("gKey", 3600, false, "i", playerid);
return 1;
}
Thnks, but now are 6 errors...

C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(1) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(3) : error 017: undefined symbol "MAX_PLAYER_NAME"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4 -- 5) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4 -- 5) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#8

Quote:
Originally Posted by andreiu95
Посмотреть сообщение
Thnks, but now are 6 errors...

C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(1) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(3) : error 017: undefined symbol "MAX_PLAYER_NAME"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4 -- 5) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4 -- 5) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Sorry for posting in romanian but, andreiu, esti constient ca trebuie sa il integrezi in GM?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)